This issue can't be edited

Because it belongs to an archived project. Jira admins can restore projects from the archive.

Collections of elements should be stored and returned in the same order with MongoDB

Description

From the forum:

When I persist object with embedded collection that is defined like

... private List<TimeInstant> values; @ElementCollection @Column(name = "values") public List<TimeInstant> getValues() { return values; } ....

this collection got persisted in random order.
I mean if my list is

{timeInstant1, timeInstant2, timeInstant3}

in database it may look like

"values" : [ { timeInstant2 }, { timeInstant1 }, { timeInstant3 } ]

List is initiated as an ArrayList.

Environment

None

Activity

Show:
Duplicate

Details

Assignee

Reporter

Participants

Davide D'Alto

Components

Fix versions

Priority

Created January 13, 2017 at 3:12 PM
Updated February 14, 2017 at 11:15 AM
Resolved February 14, 2017 at 11:15 AM

Flag notifications