Skip to content

Commit 9dff289

Browse files
committed
fix: use a constistent name for entityId column option
1 parent a3d806d commit 9dff289

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/polymorphic.interface.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface PolymorphicInterface {
88
hasMany: boolean;
99
primaryColumn?: string;
1010
entityTypeColumn?: string;
11-
entityTypeId?: string;
11+
entityIdColumn?: string;
1212
eager: boolean;
1313
cascade: boolean;
1414
deleteBeforeUpdate: boolean;
@@ -31,7 +31,7 @@ export interface PolymorphicDecoratorOptionsInterface {
3131
cascade?: boolean;
3232
eager?: boolean;
3333
entityTypeColumn?: string;
34-
entityTypeId?: string;
34+
entityIdColumn?: string;
3535
}
3636

3737
export type PolymorphicChildType = {

src/polymorphic.repository.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type PolymorphicHydrationType = {
3131
const entityTypeColumn = (options: PolymorphicMetadataInterface): string =>
3232
options.entityTypeColumn || 'entityType';
3333
const entityIdColumn = (options: PolymorphicMetadataInterface): string =>
34-
options.entityTypeId || 'entityId';
34+
options.entityIdColumn || 'entityId';
3535
const PrimaryColumn = (options: PolymorphicMetadataInterface): string =>
3636
options.primaryColumn || 'id';
3737

0 commit comments

Comments
 (0)