title: Does hibernate preserve the order of a LinkedHashSet and if so, how?
body: <p>Does hibernate preserve the order of a LinkedHashSet and if so, how? In case this depends on the type of database, I'd like to know this for PostgreSQL.</p>
  
  <p><strong>Background:</strong></p>
  
  <p>I know what a LinkedHashSet is for, and the reason I'm asking this is because I'm logging the names of some functions I execute to a 'logError' table that has a many-to-many relation to some 'functionName' table.
  I need these functions to remain in the same order as when I executed them, so first I find the corresponding 'functionName' objects, put them in a LinkedHashSet (after each function that failed) and then I persist the 'logError' object.</p>
  
  <p>Now when I get the 'logError' object from the database again, will it still be ordered? And if so, I was curious how this is done by Hibernate.</p>