-->
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: Hbm generation for mysql. generator class not correct
PostPosted: Sat Jan 06, 2007 4:38 am 
Newbie

Joined: Fri Jan 05, 2007 5:23 am
Posts: 2
Location: Mumbai
I am using Mysql database 5.0.
I have generated hbm files using hibernate3.jar and hibernate tools 8beta.
My primary key column for all the tables is of type int with auto_increment.

the generator class created should be of type
<generator class="native">
<param name="sequence">category_seq</param>
</generator>

however the generator class that is getting generated is of type
<generator class="assigned" />

Is there any kind of setting that i need to do in reveng.xml for this.

The task i am using is
<hibernatetool>
<jdbcconfiguration packagename="${hibernate.domain.package.name}" propertyfile="${build.dir}\build.properties" revengfile="${build.dir}\revenge.xml" />
<hbm2hbmxml destdir="${build.temp.dir}" templatepath="${hbm.template.path}" >
<property key="jdk5" value="true"/>
<property key="ejb3" value="false"/>
</hbm2hbmxml>


revenge.xml is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering
SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>

<type-mapping>
<sql-type jdbc-type="INTEGER"
hibernate-type="java.lang.Integer" />
</type-mapping>

</hibernate-reverse-engineering>

Plese help.

_________________
Thanks & Regards,
Alam Ansari


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 06, 2007 5:20 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
read hibernate tool reveng.xml docs about primary key generator.

_________________
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.