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 }}
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
Order clause is broken - +options[:order]+ entry #<Origin::Key:0x00000004c1bc50...> of an unsupported object Origin::Key (ArgumentError) #287
I can't use the order clause in Zoo.all(order: [:created_at.desc]). It still works without the desc or asc bit.
Running ruby-2.2.2, data_objects (0.10.16), and datamapper (1.2.0)
/usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:968:in `block in assert_valid_order': +options[:order]+ entry #<Origin::Key:0x00000004c1bc50 @name=:silly_name, @strategy=:__override__, @operator=-1, @expanded=nil, @block=nil> of an unsupported object Origin::Key (ArgumentError)
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:947:in `each'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:947:in `assert_valid_order'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:773:in `block in assert_valid_options'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:766:in `each'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:766:in `assert_valid_options'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:363:in `update'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/query.rb:386:in `merge'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/model.rb:767:in `scoped_query'
from /usr/local/rvm/gems/ruby-2.2.2/gems/dm-core-1.2.1/lib/dm-core/model.rb:342:in `all'
from test.rb:14:in `<main>'
Are those the only gems? I have no idea what Origin::Key is … or where it's coming from. My guess is there might another gem that monkey-patches Symbol with methods like desc or asc and it blows away what DM does.
Activity
tpitale commentedon May 24, 2016
Are those the only gems? I have no idea what
Origin::Keyis … or where it's coming from. My guess is there might another gem that monkey-patchesSymbolwith methods likedescorascand it blows away what DM does.