-->
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.  [ 3 posts ] 
Author Message
 Post subject: migration from hibernate2.1.7 to hibernate3 question
PostPosted: Fri May 20, 2005 11:07 am 
Beginner
Beginner

Joined: Wed Feb 23, 2005 9:24 am
Posts: 28
I'm using middlegen, hbm2java and xdoclet for pojo and mapping files generations.

I would like to migrate from hibernate 2.1.7 to hibernate3.
I've read the hibernate3 migration guide and I'm aware of the needed
modification for my application to keep on working.

I'm blocked from mapping files generation. Because in the xdoclet task,
I have to specify the hibernate version.

Can someone tells me what to do in order to generate hibernate3 compatibles mapping files.

here is an extract of my ant tasks.


<target name="hbm2java" depends="middlegen" description="Generate .java from .hbm files.">
<taskdef
name="hbm2java"
classname="net.sf.hibernate.tool.hbm2java.Hbm2JavaTask"
classpathref="lib.class.path"/>

<hbm2java output="${build.gen-src.dir}">
<fileset dir="${build.hibernate.mapping.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</hbm2java>
</target>

<target name="xdoclet">
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"
classpathref="lib.class.path"/>

<hibernatedoclet
destdir="${build.xdoclet.mapping.dir}"
excludedtags="version,@author,@todo"
force="true"
mergedir="merge/">
<fileset dir="${build.gen-src.dir}">
<include name="**/com/nxbp/nis/media/model/*.java"/>
</fileset>

<hibernate version="2.0"/>
</hibernatedoclet>
</target>




Any help is greetly appreciated.

Meissa


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 20, 2005 11:19 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
XDoclet now (the latest - 1.2.3 +) supports the version 3.0 argument so that should be OK. Middlegen currently does not support v3.0 output (I should add it to help migration issues like these), while your waiting for me to do it formally I suggest you edit the velocity script and change the DTD reference at the top of the script. That should be all that is needed.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 21, 2005 6:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://cvs.sourceforge.net/viewcvs.py/* ... ml?rev=1.4

for how the new ant tasks in tools does it (hbm2java and new reverse engineering stuff)

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