-->
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: [xdoclet] @array generates incorrect inverse attribute
PostPosted: Sat Mar 27, 2004 7:30 am 
Newbie

Joined: Mon Oct 27, 2003 10:03 am
Posts: 15
I have an unidirectional parent->child relationship where Project (parent) holds a reference to an array of Crafts (child, Craft[]). I would like to have xdoclet 1.2 generate the mapping for me. But if I annotate Project.java with

/**
* @hibernate.array
* cascade="all-delete-orphan"
* @hibernate.collection-index
* column="craft_position"
* @hibernate.collection-key
* column="project_id"
* @hibernate.collection-one-to-many
* class="manplan.j2ee.model.Craft"
*/
public Craft[] getCrafts()

it will give me

<array
name="crafts"
inverse="false"
cascade="all-delete-orphan"
>
<key
column="project_id"
/>
<index
column="craft_position"
/>
<one-to-many
class="manplan.j2ee.model.Craft"
/>
</array>

which is wrong since the <array> tag does not accept the "inverse" attribute. Hibernate will consequently fail upon reading this mapping. Is there a way of getting around this problem?

Thanks,
Olaf


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 9:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Create a entry in the XDoclet JIRA system - this allow someone to fix the problem. You could also look at the xdt files and change the definition to not include the inverse attribute for arrays. It should not be difficult or involved at all. If you do then include the patch with your JIRA entry.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2004 3:58 am 
Newbie

Joined: Mon Oct 27, 2003 10:03 am
Posts: 15
I found out that it's a known bug and already registered with JIRA. Patched the xdt file and rebuilt xdoclet. Works like a charm.

Olaf


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.