DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCMONGODB-111
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Unassigned
Reporter: Paul de Monchy
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store MongoDB

Embedded list of persistent objects generate ClassCastExceptions in MongoDB

Created: 16/Nov/12 07:01 PM   Updated: 31/Jul/13 04:54 PM   Resolved: 27/Jun/13 08:06 PM
Component/s: Persistence
Affects Version/s: 3.1.0.release, 3.1.1, 3.1.2, 3.1.3
Fix Version/s: None

File Attachments: 1. Zip Archive MongoDBIssue.zip (5 kB)

Environment: MacOS/Linux/Windows

Datastore: MongoDB
Severity: Development


 Description  « Hide
This bug is viewable through the following 2-step process :
1) Persisting an object that contains a list of embedded element that are composed of persistent objects --> OK
2) Retrieving the list of embedded element --> NOK

Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to com.mongodb.DBObject
at org.datanucleus.store.mongodb.fieldmanager.FetchFieldManager.fetchObjectField(FetchFieldManager.java:383)
at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:2353)
...

Sort Order: Ascending order - Click to sort in descending order
Paul de Monchy added a comment - 19/Dec/12 12:46 PM
Hi,

If someone have any idea of a way of solving this issue, I would greatly appreciate ?
I have previously attached a test case that helps understanding the problem. Should you need any further information, don't hesitate.
Thanks in advance.

Best regards,

Paul.

Andy Jefferson added a comment - 27/Jun/13 08:06 PM
Ran your test using current releases and see no issue