added format command and added trailing commas to reduce conflicts

This commit is contained in:
dswbx
2025-02-26 20:06:03 +01:00
parent 88b5359f1c
commit 7743f71a11
414 changed files with 3622 additions and 3610 deletions

View File

@@ -15,12 +15,12 @@ export class PolymorphicRelation extends EntityRelation<typeof PolymorphicRelati
[
EntityRelation.schema,
Type.Object({
targetCardinality: Type.Optional(Type.Number())
})
targetCardinality: Type.Optional(Type.Number()),
}),
],
{
additionalProperties: false
}
additionalProperties: false,
},
);
constructor(source: Entity, target: Entity, config: Partial<PolymorphicRelationConfig> = {}) {
@@ -63,7 +63,7 @@ export class PolymorphicRelation extends EntityRelation<typeof PolymorphicRelati
reference_other,
entityRef,
otherRef,
groupBy
groupBy,
};
}
@@ -72,7 +72,7 @@ export class PolymorphicRelation extends EntityRelation<typeof PolymorphicRelati
return qb
.innerJoin(other.entity.name, (join) =>
join.onRef(entityRef, "=", otherRef).on(whereLhs, "=", reference)
join.onRef(entityRef, "=", otherRef).on(whereLhs, "=", reference),
)
.groupBy(groupBy);
}
@@ -83,8 +83,8 @@ export class PolymorphicRelation extends EntityRelation<typeof PolymorphicRelati
return {
where: {
[this.getReferenceField().name]: info.reference_other,
[this.getEntityIdField().name]: id
}
[this.getEntityIdField().name]: id,
},
};
}