mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 08:36:01 +00:00
added format command and added trailing commas to reduce conflicts
This commit is contained in:
@@ -22,7 +22,7 @@ export class OneToOneRelation extends ManyToOneRelation {
|
||||
mappedBy,
|
||||
inversedBy,
|
||||
sourceCardinality: 1,
|
||||
required
|
||||
required,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export class OneToOneRelation extends ManyToOneRelation {
|
||||
override async $set(
|
||||
em: EntityManager<any>,
|
||||
key: string,
|
||||
value: object
|
||||
value: object,
|
||||
): Promise<MutationInstructionResponse> {
|
||||
throw new Error("$set is not allowed");
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export class OneToOneRelation extends ManyToOneRelation {
|
||||
override async $create(
|
||||
em: EntityManager<any>,
|
||||
key: string,
|
||||
value: unknown
|
||||
value: unknown,
|
||||
): Promise<void | MutationInstructionResponse> {
|
||||
if (value === null || typeof value !== "object") {
|
||||
throw new Error(`Invalid value for relation field "${key}" given, expected object.`);
|
||||
|
||||
Reference in New Issue
Block a user