This issue can't be edited
Because it belongs to an archived project. Jira admins can restore projects from the archive.
Embeddable object with an ElementCollection that contains Embeddable objects
Description
Environment
Attachments
Activity
Michael Wirth March 31, 2018 at 2:08 PM
I have the same issue. I really wonder why this issue hasn't come up earlier with more attention as having an ElementCollection in an Embeddable doesn't sound to be an exotic use case. Attention: this is not related having a nestedn ElementCollection in another ElementCollection.
Digging into the code I found the causing issue in the TypeHelper.class in Line 240. The recursive call has no effect at all, as it just copies the values into a new Object array, but doesn't process the result. A quick test showed that the issue can be fixed by applying the result values to the containing object:
Details
Details
Assignee
Reporter

Labels
Bug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants

I have the following objects
I was expecting the Mongo object would look like this:
Instead it looks like this (which is not desired):
I can achieve the desired situation as follows:
However, this is not the way I want to store the objects.