google-code-export / appengine-jruby

Automatically exported from code.google.com/p/appengine-jruby
0 stars 0 forks source link

Cannot sort by Id when filtering by id #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Sort by ID works only when not used to filter.
working scenario:

> @r = TwitterCrawling::TwitterUser.all(:order => [:id.asc], :limit => 5)
[
1
3
7
22
25
]

> @r = TwitterCrawling::TwitterUser.all(:order => [:id.desc], :limit => 5)
[
51407
51400
51388
51375
51342
]

Not working scenario, when filtering by id:

@r = TwitterCrawling::TwitterUser.all(:id.gt => 2, :order => [:id.desc], :limit 
=> 5)
[
51407
51400
51388
51375
51342
]

> @r = TwitterCrawling::TwitterUser.all(:id.gt => 2, :order => [:id.asc], 
:limit => 5) 
[
51407
51400
51388
51375
51342
]

Original issue reported on code.google.com by michal.h...@gmail.com on 3 Jan 2010 at 11:44