google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

toDBObject result incompatible with fromDBObject #460

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version are you using? (Morphia/Driver/MongoDB)
0.99.1

the result of toDBObject still contains basic java collections which are 
created by the embeddedmapper online 101
where it chooses between calling
mapr.toMongoObject(entryVal, true);
and calling
mapr.toDBObject(entryVal, involvedObjects);

calling tomongoobject by its description converts the value to a mongo 
compatible java object which can result in arraylist etc...

so when calling fromDBObject on the result we get an exception because 
fromdbobject expects all fields to be of type DBObject.

Original issue reported on code.google.com by had...@gmail.com on 4 Jun 2013 at 10:03

GoogleCodeExporter commented 9 years ago
i've managed to solve the issue by converting all creation of new array in 
embeddedmapper to basicdblist

Original comment by had...@gmail.com on 10 Jul 2013 at 9:52