Java Hibernate id auto increment
- by vinise
Hy
I'v a little problem with hibernate on netbeans.
I've a table with an Auto increment id :
CREATE TABLE "DVD"
(
"DVD_ID" INT not null primary key
GENERATED ALWAYS AS IDENTITY
(START WITH 1, INCREMENT BY 1),
"TITLE" VARCHAR(150),
"COM" LONG VARCHAR,
"COVER" VARCHAR(150)
);
But this auto increment is not properly detected with Reverse Engineering.
I get a map file with this :
<id name="dvdId" type="int">
<column name="DVD_ID" />
<generator class="assigned" />
</id>
i've looked on google and on this site ... foud some stuf but i'm still stuck..
i've tried to add insert="false" update="false" on the map file but i get back :
Caused by: org.xml.sax.SAXParseException: Attribute "insert" must be declared for element type "id".
Anny help will be pleased
Vincent