rom-sql
rom-sql copied to clipboard
Translate symbols in a hash applied to `Relation#where` to attributes
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.
Ah yes, we wanted to do it long time ago :) I'm glad you reported an issue about it <3