When trying to save my object into my designated table, i get an sql column mismatch on the primary key.
Hibernate: insert into Contact (lastname, firstname, street, suburb, ContactNumber) values (?, ?, ?, ?, ?)
My ID or primary key (ContactNumber) is the first column in my table, not the last, therefore it won't insert. Here is my config file for my object.
<hibernate-mapping>
<class name="au.com.remotemethod.orm.Contact" table="Contact">
<id name="contactNumber" column="ContactNumber" type="long">
<generator class="increment"/>
</id>
<property name="lastname"/>
<property name="firstname" />
<property name="street" />
<property name="suburb" />
</class>
</hibernate-mapping>
any ideas?
D.
|