From the forum:
When I persist object with embedded collection that is defined like
Code: {code} ... private List<TimeInstant> values;
@ElementCollection @Column(name = "values") public List<TimeInstant> getValues() { return values; }
.... {code}
this collection got persisted in random order. I mean if my list is Code: {code} {timeInstant1, timeInstant2, timeInstant3} {code} in database it may look like Code: {code} "values" : [ { timeInstant2 }, { timeInstant1 }, { timeInstant3 } ] {code}
List is initiated as an ArrayList. |
|