mflavell wrote:
<snip>
In one of the tables the primary key is the second column in the table. Now when I create the objectname.hbm.xml I have to declare the ID before the property columns. This seems to imply that the primary key (or composite PK) has to be first in the table.
Does anyone know a way around this at all - changing the table is not an option.
There's absolutely no requirement that columns are in the same order in the database; in fact SQL doesn't specify column / fields ordering either.
Try it and see - it should work just fine as long as the column names are correct!
Christian Ashby