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

Translate symbols in a hash applied to Relation#where to attributes #396

Open
flash-gordon opened this issue Feb 22, 2021 · 1 comment
Open
Milestone

Comments

@flash-gordon
Copy link
Member

We store qualified attributes in schemas, that's good. But when you call .where(name: 'abc') then symbols from the hash don't get converted to attributes from the schema and thus get translated to unqualified SQL identifiers. At the same time, using the block syntax will produce qualified attributes: where { name.is('abc') }. This discrepancy confuses people, we should transform symbol keys into qualified attributes. This will be a breaking change.

@flash-gordon flash-gordon added this to the 4.0.0 milestone Feb 22, 2021
@solnic
Copy link
Member

solnic commented Feb 23, 2021

Ah yes, we wanted to do it long time ago :) I'm glad you reported an issue about it <3

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

2 participants