PK « Insert « JPA Q&A





1. Not able to insert a record in mysql table with auto-increment key as PK    stackoverflow.com

i am not able to insert a record. i am using hibernate and mysql. files are as follows... Route.hbm.xml

    <id name="routeId" type="java.lang.Integer" unsaved-value="null">
        ...

2. PK padding prevents update following insert    forum.hibernate.org

Hibernate version: 3.0.5 prod Name and version of the database you are using: Informix 9.x The user must be able to insert, then update an object to a table where the PK is a char(2) (no, I did not design it). If the ID property is set to '5', the DB result ends up as a row w/ PK = '5 ...

4. Stop Hibernate passing PK on insert.    forum.hibernate.org

I have a table mapped like so: