Skip to content

Column name problem. #1283

Answered by RomainLanz
pk4all asked this question in Help
Jul 21, 2020 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey @pk4all! 👋

This is normal since we are following SQL convention (where your column should be snake_case).
If you want to bypass this, you can freely change the behavior of our serializer to not mutate the column name.

Inside the config/database.ts file, you need to overide the getSerializeAsKey method.

orm: {
  getSerializeAsKey(_, key) {
    return key;
  },
},

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@thetutlage
Comment options

@pk4all
Comment options

Answer selected by pk4all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants