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 has been archived by the owner on Apr 17, 2018. It is now read-only.
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I can't use the order clause in
Zoo.all(order: [:created_at.desc])
. It still works without thedesc
orasc
bit.Running
ruby-2.2.2
,data_objects (0.10.16)
, anddatamapper (1.2.0)
Please see this stackoverflow post.
Stack trace:
Gemset:
The text was updated successfully, but these errors were encountered: