Open gaffneyc opened 11 years ago
Agreed. Really this should be mentioned in one of[1] the Mongoid docs[2]. I had to do some DuckDuckGoing to even figure out it was an option, and issue searching to figure out the solution.
[1] http://rdoc.info/gems/mongoid/3.1.6/Mongoid/Relations/Macros/ClassMethods#has_many-instance_method [2]http://mongoid.org/en/mongoid/docs/relations.html
If you fail to give a direction for an order you get this really unhelpful error message:
What would be the best approach here? Converting an app from another ORM that defaults to ascending order if not specified and was thinking of doing that.
If there is a preferred direction for this I'll put together a pull request with a fix.