We're updating the issue view to help you get more done. 

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

1 2 3 4 5 6 7 8 9 10 ... 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

1 {timeInstant1, timeInstant2, timeInstant3}

in database it may look like

1 2 3 "values" : [ { timeInstant2 }, { timeInstant1 }, { timeInstant3 } ]

List is initiated as an ArrayList.

Environment

None

Status

Assignee

Davide D'Alto

Reporter

Davide D'Alto

Components

Fix versions

Priority

Major