Saving order of a List in JPA

Posted by Rosen Martev on Stack Overflow See other posts from Stack Overflow or by Rosen Martev
Published on 2010-04-15T08:09:46Z Indexed on 2010/04/15 8:13 UTC
Read the original article Hit count: 231

Filed under:

Hello,

I have the following question about JPA:

Can I save the order of the elements in a java.util.List? In my application the order in which I put elements in the Lists is important but after I get those collections from the database the order is not the same (as expected). Can you show me a way to deal with this problem?

P.S. There is not a field in the entities that I put in the collections by which I can order them.

Rosen

© Stack Overflow or respective owner

Related posts about jpa