-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
I know that mongo allows to use an object as object id. However I can't find a way to do it, is it a mongoid limitation ?
Here is what I expected :
Lesson.find_or_create_by(:_id => { :i => BSON::ObjectId.new, :week => 23 }) # I get : # {"_id":"4fc788f3f73147f19500005a"} # When I should get : # {"_id" => {"i" => BSON::ObjectId('4fc788f3f73147f19500005a'), "week" => 23}}
Thx for your help.