-->
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.  [ 4 posts ] 
Author Message
 Post subject: hibernate2 xdoclet and relationships with 'role' in them
PostPosted: Tue Jun 01, 2004 8:56 am 
Beginner
Beginner

Joined: Thu Jan 15, 2004 11:16 am
Posts: 37
When using xdoclet in hibernate2 it is required to do the following...

<replacefilter token="role" value="name"/>

After running xdoclet.
Does this mean that it us not possible to have relationships called role?
Or even with the string 'role' in them?

I was starting to think I was going a bit mad when my 'roles' relationship was changing to 'names'.

ta,
Stuart.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 01, 2004 9:59 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
http://www.hibernate.org/72.html

Note: Add <hibernate version="2.0"/> to your Ant build if you're using the latest XDoclet and like to generate a Hibernate 2.0 conform mapping. You will get strange errors otherwise (Hibernate 1.x mappings don't work well with Hibernate2).

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 6:01 am 
Beginner
Beginner

Joined: Thu Jan 15, 2004 11:16 am
Posts: 37
Yes I am using hibernate 2.1.3 and xdoclet 1.2
Yes I have the following ant task...

<hibernatedoclet
destdir="${generated.dir}/mappings"
excludedtags="@version,@author,@todo"
force="${generated.forced}"
mergedir="${generated.dir}/mappings"
verbose="false">

<fileset dir="${src.main.dir}" includes="org/electionsforall/eigg/core/*.java"/>

<hibernate version="2.0"/>

</hibernatedoclet>

And the documentation you refer to says that I need the following...

<replace dir="${generated.home}">
<include name="**/hibernate/*.hbm.xml"/>
<replacefilter token="readonly" value="inverse"/>
<replacefilter token="role" value="name"/>
<replacefilter token="hibernate-mapping.dtd" value="hibernate-mapping-2.0.dtd"/>
</replace>

Is the documentation not right?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 6:14 am 
Beginner
Beginner

Joined: Thu Jan 15, 2004 11:16 am
Posts: 37
Ive just seen the comments at the bottom of that page that states that step 4 should be removed from the docs.

I have just updated the docs.
:-)

ta for the help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.