-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hbm2hbmxml How-to <generator class="native">
PostPosted: Wed May 17, 2006 3:12 pm 
Regular
Regular

Joined: Sat Nov 06, 2004 5:20 pm
Posts: 54
Location: Collierville, TN
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"?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 17, 2006 6:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
look for reveng.xml in the docs.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.