This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2 Replies Last post: Jul 8, 2013 11:20 PM by Bob Gleason  
Bob Gleason Newbie 2 posts since
Jul 6, 2013
Currently Being Moderated

Jul 6, 2013 9:54 PM

JPA Console Generated DDL alphabetical column order

When I use the JPA Console to "Generate persistence unit DDL" the DDL generates tables with columns that are in alphabetical order by column name, with inherited fields at the top (this is a good thing), alphabetized as a separate group. I would expect - and GREATLY prefer - that the column order match the order which I have defined for the fields in my entity classes with JPA annotations.


Is there a way to change this odd behavior for myself locally? Or is this something that requires a code change to the IDEA implementation? Or is this the result of strangeness in some underlying code that is only invoked by the IDEA Generate DDL function?


-Bob Gleason-

Gregory Shrago JetBrains 247 posts since
Mar 27, 2006
Currently Being Moderated
Jul 8, 2013 4:48 PM in response to: Bob Gleason
Re: JPA Console Generated DDL alphabetical column order

Generate DDL/SQL actions call the current persistence provider. Hibernate, EclipseLink, OpenJPA are supported.

Depending on what provider you use there may be ways to configure this behavior.


The point is that generated DDL/SQL statements are exactly the same as the ones issued by the provider in runtime.

More Like This

  • Retrieving data ...