Finding with composite id and noClassNameStored is set to true fails
20 views
Skip to first unread message
Johan Haleby
unread,
Feb 28, 2012, 10:04:29 AM2/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Morphia
Hi,
I have an entity annotated with @Entity where noClassNameStored is set
to true and the id of the entity is a composite id. When persisting
the entity no class name is stored in Mongo neither for the entity or
for the ID object. But when I search using the following query
Morphia inserts the class name of the composite id in the query and
thus no entities are found. If I manually cut and paste the query and
remove the className from the query it's successful. I assume that
this is a bug?
Regards,
/Johan
Johan Haleby
unread,
Mar 8, 2012, 2:48:12 AM3/8/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Morphia
I'm running in to this issue quite often and since I've received no reply I've added it as a bug. If you give any pointers on how to fix it perhaps I can help out with a patch.