-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discriminator conflict reported even for non-inherited tables #2984
Labels
Comments
amaranth
added a commit
to amaranth/typeorm
that referenced
this issue
Oct 24, 2018
If an entity has the same discriminator value as one using @TableInheritance this should be allowed as there is no way for them to conflict. Fixes typeorm#2984.
amaranth
added a commit
to amaranth/typeorm
that referenced
this issue
Oct 19, 2020
If an entity has the same discriminator value as one using @TableInheritance this should be allowed as there is no way for them to conflict. Fixes typeorm#2984.
imnotjames
pushed a commit
that referenced
this issue
Oct 20, 2020
If an entity has the same discriminator value as one using `TableInheritance` this should be allowed as there is no way for them to conflict. This commit also fixes the discriminatorColumn check to check all the entities it should be checking. Only the parent in an STI setup has the "STI" inheritancePattern, the children just have the "entity-child" tableType. Before two children with the same discriminatorValue would be (incorrectly) allowed as they'd never even get checked. Fixes #2984
zaro
pushed a commit
to zaro/typeorm
that referenced
this issue
Jan 12, 2021
…2985) If an entity has the same discriminator value as one using `TableInheritance` this should be allowed as there is no way for them to conflict. This commit also fixes the discriminatorColumn check to check all the entities it should be checking. Only the parent in an STI setup has the "STI" inheritancePattern, the children just have the "entity-child" tableType. Before two children with the same discriminatorValue would be (incorrectly) allowed as they'd never even get checked. Fixes typeorm#2984
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type:
[ ] question
[X] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[X]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[X]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
If you have two entity classes with the same name and one of them uses
@TableInheritance
TypeORM will check to see if other entities have the same discriminator and fail because the other class does. However, as this other class is just a plain entity the conflict shouldn't matter, they don't have any effect on each other.entities/issue/note.ts
:entities/commit/note.ts
:The text was updated successfully, but these errors were encountered: