I found that when we created the tables using Hibernate, the columns sequence of the created tables is not the same with the sequence of entity fields.
And I also found most of the related source codes are using LinkedHashMap or List to store the fields(or properties) in order, so I believe that Hibernate is aiming to keep the same sequence of the table columns as entity fields.
I traced the source codes and found that in the org.hibernate.cfg.PropertyContainer , TreeMap is used to store the fields. I replaced all the TreeMap with LinkedHashMap, without modifing any other codes, it works – table columns get the same order as fields defined in entity.
So, could you please take a look at this issue, fix this in future version ASAP.