-->
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 tags for Many-to-Many with associated attributes
PostPosted: Thu Dec 16, 2004 7:36 am 
Newbie

Joined: Mon Oct 04, 2004 10:54 am
Posts: 15
Hibernate version: 2.1

Using latest version of Xdoclet, How do I write the xdoclet code to generate hibernate mapping documents for a "many-to-many" relation between UE table and TRAFFIC with an additional column.

UE (UE_ID, ...)
TRAFFIC(TRAFFIC_ID, ...)
UE_TRAFFIC(UE_ID, TRAFFIC_ID, IS_UE_ORIGINATING)

I've created a UeTrafficBean but are a bit unsure of how to set the primary key here...

In TrafficBean I've got the code:
/**
* @hibernate.set table="UE_PROPERTY_TRAFFIC"
* @hibernate.collection-key column="STATISTICS_ID"
* @hibernate.collection-composite-element class="UeLinkedTrafficBean"
* @return Returns the traffic.
*/
public Set<TrafficBean> getTraffic() {
return traffic;
}

I have no relation to traffic in UeBean.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2004 8:28 am 
Regular
Regular

Joined: Sun Aug 01, 2004 6:49 pm
Posts: 76
Look for idbag in the documentation, this is what you need.

XDoclet does not support idbags by default. But you can import custom tags in your hbm files.
See the end of your generated hbm files, there is a note how to include additional tags.

HTH
Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2004 8:42 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
thhart wrote:
Look for idbag in the documentation, this is what you need.

XDoclet does not support idbags by default. But you can import custom tags in your hbm files.
See the end of your generated hbm files, there is a note how to include additional tags.

HTH
Thomas


latest version ( say hibernate plugin for xdoclet-2 has idbag support. )

regards,

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


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.