【发布时间】:2012-07-24 14:48:15
【问题描述】:
我在 PostgreSQL 中使用 Rails,它非常适合这样的查询:
# Does hstore_column contain key?
scoped_users = User.where('hstore_column ? :key', key: 'name_of_key')
现在我的问题:如何反转此查询/如何找到所有没有指定特定键的用户?
# I tried this query amongst others, but it does not work:
scoped_users = User.where('hstore_column ? :key = FALSE', key: 'name_of_key')
感谢您的帮助!
【问题讨论】:
标签: ruby-on-rails postgresql where