Issue 318 in morphia: LinkedHash cannot be cast to DBObject

4 views
Skip to first unread message

mor...@googlecode.com

unread,
Sep 1, 2011, 3:19:12 AM9/1/11
to morphia...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Low

New issue 318 by flaper87: LinkedHash cannot be cast to DBObject
http://code.google.com/p/morphia/issues/detail?id=318

What version are you using? (Morphia/Driver/MongoDB)

Latest snapshot and latest mongodb driver.

I'm getting a Cast error while trying to map a BasicDBObject to my model.
This model contains a field that is a HashSet<OtherModel> where OtherModel
implements Map.

The exact error points to this line:

http://code.google.com/p/morphia/source/browse/trunk/morphia/src/main/java/com/google/code/morphia/mapping/EmbeddedMapper.java?r=1682#167

I can't send the code because it is a private app but let me know if I can
do anything to help with this.


Just to recap:

HashSet<InnerObject> myfield = new HashSet<InnerObject>();

The basic object that I'm trying to map contains a key myfield that is an
ArrayList of LinkedHashMap


Thanks

mor...@googlecode.com

unread,
Feb 28, 2014, 11:34:04 PM2/28/14
to morphia...@googlegroups.com

Comment #1 on issue 318 by justin....@10gen.com: LinkedHash cannot be cast
to DBObject
http://code.google.com/p/morphia/issues/detail?id=318

If you're still seeing this problem can you comment over here
(https://github.com/mongodb/morphia/issues/318) and we can dig in to it.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages