Is there an idiomatic way in Mongoid 3.0.0 to query a collection of documents using a non-unique field named id
which is not the same as _id
?
#<BltBasket _id: 52a16cd36cf462b442871709, id: 9334, ...>
Thanks!
Is there an idiomatic way in Mongoid 3.0.0 to query a collection of documents using a non-unique field named id
which is not the same as _id
?
#<BltBasket _id: 52a16cd36cf462b442871709, id: 9334, ...>
Thanks!
For me one good thing about mongoid is that you can define aliases.
So for your example I would see it as
which will provide you with a
Excuse me if I understood your question the wrong way :-)