[jboss-user] [EJB 3.0] - Column Order In Auto-Generated Tables And Compound Primary K
jochen.reinhardt
do-not-reply at jboss.com
Fri Mar 20 09:19:50 EDT 2009
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!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219848#4219848
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219848
More information about the jboss-user
mailing list