You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE REQUEST] Make behavior on key conflict in where clause compatible with ActiveRecord #49
On the other hand, ActiveRecord generates "users"."a" = 1 AND "users"."a" = 2, and it returns empty set.
require"bundler/inline"gemfiledosource"https://rubygems.org"gem"activerecord","6.1.0"gem"sqlite3"endrequire"active_record"# This connection will do for database-independent bug reports.ActiveRecord::Base.establish_connection(adapter: "sqlite3",database: ":memory:")ActiveRecord::Base.logger=Logger.new("/dev/null")ActiveRecord::Schema.definedocreate_table:users,force: truedo |t|
t.integer:aendendclassUser < ActiveRecord::BaseendputsUser.where(a: 1).where(a: 2).to_sql#=> SELECT "users".* FROM "users" WHERE "users"."a" = 1 AND "users"."a" = 2
These behaviors are opposite and can confuse us when building queries with split scoped or methods. So I request to add an option or something like that to make Plucky's behavior compatible with ActiveRecords' one.
Activity