Hibernate: how to maintain insertion order
- by jwaddell
I have a list of entities where creation order is important, but they do not contain a timestamp to use for sorting. Entities are added to the end of the list as they are created so they will be ordered correctly in the list itself.
After persisting the list using Hibernate the entities appear in the database table in the order that they were…