sof
sof

Reputation: 9649

Order of persisted list field on JPA

It's feasible for JPA 2.x to persist list-typed field below,

@ElementCollection
private List<String> list;

Does JPA 2.x further prescribe to retain the order of the elements in the persisted list after it is queried?

Upvotes: 0

Views: 233

Answers (1)

Chris
Chris

Reputation: 21145

How they are returned is dependent on the database unless there is an order field in the table. See http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Order_Column_.28JPA_2.0.29 on the orderColumn annotation

Upvotes: 2

Related Questions