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

@Column({ columnName }) does not work #25

Open
sergey-shablenko opened this issue Aug 15, 2022 · 0 comments
Open

@Column({ columnName }) does not work #25

sergey-shablenko opened this issue Aug 15, 2022 · 0 comments

Comments

@sergey-shablenko
Copy link

I have a model

@Table({ tableName: 'some_table' })
export class SomeModel extends Model {
  @Column({ columnName: 'some_column_asd_1', type: columnTypes.string })
  someColumnAsd1?: string;
}

it works just fine if I use someModel.query().select()
but it does not work if I use it like someModel.query().select('someColumnAsd1')
it tries to select some_column_asd1 instead of one I set in decorator some_column_asd_1
it also breaks insterts\updates and any request that uses someColumnAsd1 as a reference to column

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

No branches or pull requests

1 participant