Using ant - I use a jdbcconfiguration along with <hbm2hbmxml /> to create hbm.xml for tables in DB2.
In a script I add pk contraints like this:
Code:
CREATE TABLE "JRUFFIN "."PARENT" (
"PARENTPK" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (
START WITH +1
INCREMENT BY +1
MINVALUE +1
MAXVALUE +2147483647
NO CYCLE
CACHE 20
NO ORDER ) ,
...
Code:
CREATE UNIQUE INDEX "JRUFFIN "."XPKPARENT" ON "JRUFFIN "."PARENT" ("PARENTPK" ASC) ;
Code:
ALTER TABLE "JRUFFIN "."PARENT"
ADD CONSTRAINT "SQL060328145858500" PRIMARY KEY
("PARENTPK");
Problem is: in the hbm.xml the generator class=
"assigned" how can I automate this to
"native"?