composite-primary-keys/composite_primary_keys

Rails 6.1.3, active_record 6.1.3 ndefined method `composite?' for xxx:Integer

Closed this issue · 1 comments

I'm running with Rails 6.1.3, active_record 6.1.3 and I get the following error on a simple query for a model which doesn't have any composite PKs.

Failed with exception undefined method `composite?' for 598:Integer
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/bundler/gems/composite_primary_keys-17f107092bfa/lib/composite_primary_keys/relation/predicate_builder/association_query_value.rb:30:in `ids'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/bundler/gems/composite_primary_keys-17f107092bfa/lib/composite_primary_keys/relation/predicate_builder/association_query_value.rb:15:in `queries'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/predicate_builder.rb:105:in `block in expand_from_hash'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/predicate_builder.rb:84:in `each'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/predicate_builder.rb:84:in `flat_map'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/predicate_builder.rb:84:in `expand_from_hash'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/predicate_builder.rb:29:in `build_from_hash'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/query_methods.rb:1091:in `build_where_clause'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/query_methods.rb:645:in `where!'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/relation/query_methods.rb:640:in `where'
/Users/mj/.rvm/gems/ruby-3.0.0@vpp-portal-ruby-3/gems/activerecord-6.1.3/lib/active_record/querying.rb:22:in `where' 

I think this is the same issue as #551