Hi folks!
FYI, I am using EJB3 with JBoss AS 5.0.1 and MySQL 5.1 as database.
I use schema auto generation for my entities. I just discovered that all fields are sorted alphabetically. I would not mind this, but it is also true for my compound primary keys.
And that is not what i want. I want to have the fields I search regularly at the beginning of the key, so that MySQL can use the key. Is there a way to take influence on the column order?
I would like my fields to appear in the same order as defined in the entity. I already tried using @Embeddable and @EmbeddedId with and without @AttributeOverrides.
I do not really want to name my columns a_..., b_... just to get a correct column order.
Please advice!