Skip to content
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

Zero as a discriminator value #3891

Closed
menixator opened this issue Mar 25, 2019 · 2 comments · Fixed by #6973
Closed

Zero as a discriminator value #3891

menixator opened this issue Mar 25, 2019 · 2 comments · Fixed by #6973

Comments

@menixator
Copy link

menixator commented Mar 25, 2019

Due to this line, I am unable to use 0 as a discriminator value. Is this intended?

if (discriminatorValue) {

Currently working around it by starting the enum I use to hold the discriminators from 1.

@imnotjames
Copy link
Contributor

I added to just that location. Wasn't enough. Somewhere else must be checking...

imnotjames added a commit to imnotjames/typeorm that referenced this issue Oct 25, 2020
imnotjames added a commit to imnotjames/typeorm that referenced this issue Oct 26, 2020
this allows discriminator values like 0, "", or `null`

fixes typeorm#3891
@imnotjames
Copy link
Contributor

Ok - ran into some weirdness but we should be good to go. Waiting on tests to pass then I'll open a PR!

imnotjames added a commit to imnotjames/typeorm that referenced this issue Oct 26, 2020
this allows discriminator values like 0, "", or `null`

fixes typeorm#3891
imnotjames added a commit to imnotjames/typeorm that referenced this issue Oct 26, 2020
allow discriminator values in Single Table Inheritance
like 0, "", or `null`

fixes typeorm#3891
pleerock pushed a commit that referenced this issue Oct 26, 2020
allow discriminator values in Single Table Inheritance
like 0, "", or `null`

fixes #3891
dolsup pushed a commit to dolsup/typeorm that referenced this issue Nov 3, 2020
allow discriminator values in Single Table Inheritance
like 0, "", or `null`

fixes typeorm#3891
zaro pushed a commit to zaro/typeorm that referenced this issue Jan 12, 2021
allow discriminator values in Single Table Inheritance
like 0, "", or `null`

fixes typeorm#3891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants