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

Table name with mixed case #2689

Open
zainab-amir opened this issue Jul 24, 2024 · 3 comments
Open

Table name with mixed case #2689

zainab-amir opened this issue Jul 24, 2024 · 3 comments

Comments

@zainab-amir
Copy link

Hey,

I have a following table in objection which maps to a table in db that starts with capital 'M'.

class Markers extends Model {
  static get tableName() {
    return 'Marker';
  }
}

Unfortunately when I run the query, objection converts the table name to lower case and I get this error

"select \"marker\".* from \"marker\" where \"id\" in ($1, $2) - relation \"marker\" does not exist",

Is there a way to make objection keep the table name as is and not convert it to lower case?

@kapouer
Copy link
Contributor

kapouer commented Aug 30, 2024

Are you using sqlite, mysql, or postgres backend ?

@zainab-amir
Copy link
Author

postgres backend

@lehni
Copy link
Collaborator

lehni commented Sep 25, 2024

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

3 participants