when hibernate generates a database table corresponding to a Java class, it seems to make 'id' the first column (so far so good) but all subsequent columns are created in alphabetical order based on field name NOT on position of field in class
Example:
hibernate hbm2ddl takes
Code:
class Foo (
private Long id;
private String species;
private String animal;
)
and makes
Code:
table foo
long id NOT NULL AUTO_INCREMENT,
varchar animal,
varchar species
but what I want is
Code:
table foo
long id NOT NULL AUTO_INCREMENT,
varchar species
varchar animal,
how can I achieve this using annotations?
TIA,
Still-learning Steve