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

Error message asking for @DiscriminatorValue, removed a few versions ago #5255

Closed
saulotoledo opened this issue Dec 27, 2019 · 0 comments · Fixed by #5256
Closed

Error message asking for @DiscriminatorValue, removed a few versions ago #5255

saulotoledo opened this issue Dec 27, 2019 · 0 comments · Fixed by #5256

Comments

@saulotoledo
Copy link
Contributor

Issue type:

[ ] question
[X] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[X] postgres
[ ] cockroachdb
[ ] 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:

According to the changelog, @DiscriminatorValue was removed in 0.2.0, but the error message for duplicated discriminators still suggest to use it. The example below shows the issue after forgetting to change the discriminator:

entities/user.ts:

@Entity('user')
@TableInheritance({column: {type: 'varchar', name: 'type'}})
export class User {

    @PrimaryGeneratedColumn()
    public id: number;

}

entities/admin.ts:

@ChildEntity('admin')
export class Administrator extends User {
}

entities/editor.ts:

@ChildEntity('admin')
export class Editor extends User {
}
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.

2 participants