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
🤨 Cannot manually insert type in discriminator column of parent entity class when using single table inheritance when creating instance of parent entity #9033
Labels
Comments
AlfaHound
changed the title
Cannot insert correct type in discriminator column of parent entity class when single table inheritance
Cannot insert correct type in discriminator column of parent entity class when using single table inheritance
May 23, 2022
AlfaHound
changed the title
Cannot insert correct type in discriminator column of parent entity class when using single table inheritance
Cannot manually insert type in discriminator column of parent entity class when using single table inheritance
May 23, 2022
AlfaHound
changed the title
Cannot manually insert type in discriminator column of parent entity class when using single table inheritance
🤨 Cannot manually insert type in discriminator column of parent entity class when using single table inheritance
May 23, 2022
AlfaHound
changed the title
🤨 Cannot manually insert type in discriminator column of parent entity class when using single table inheritance
🤨 Cannot manually insert type in discriminator column of parent entity class when using single table inheritance when creating instance of parent entity
May 23, 2022
7 tasks
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
May 27, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Aug 22, 2022
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Aug 22, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Oct 2, 2022
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Oct 2, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Nov 7, 2022
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Nov 7, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Dec 3, 2022
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Dec 3, 2022
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
Experiencing the same issue on a Postgres database. |
rebelchris
added a commit
to dailydotdev/daily-api
that referenced
this issue
Jan 28, 2023
Apparently there is an issue with using the type column on insertion. It will overwrite with the Type of the entity. typeorm/typeorm#9033 This will retro-fix the types that got overwritten via import only. WT-962 #done
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Feb 9, 2023
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Feb 9, 2023
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Apr 12, 2023
felix-gohla
added a commit
to giz-berlin/typeorm
that referenced
this issue
Apr 12, 2023
This commit allows using an instance of a base class in a Single Table Inheritance scenario and setting the discriminator value manually. Related to: typeorm#9033
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
Not sure if this is the intended behavior or not, but is it possible to directly just use the parent entity class when using STI and manually set the type? I have been trying to do bulk inserts with fake data by using the parent class, but the 'type' column gets overwritten with the parent entity class's name.
Steps to Reproduce
My Environment
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: