-->
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: Mapping a map with XDoclet
PostPosted: Sat Nov 15, 2003 10:09 am 
Regular
Regular

Joined: Sat Oct 11, 2003 11:13 am
Posts: 69
I have a Country class which needs to support national (or multi) language. The country names must be in different languages.

So I use a map. The key of the map is java.util.Locale, the value is a localized String containing the country name in different languages.

Please tell me, if these XDoclet tags are suitable for my requierements:
Code:
/**
* @hibernate.map
*  lazy="true"
*  cascade="all"
* @hibernate.collection-key
*  column="key"
* @hibernate.collection-index
*  column="index"
*  type="java.util.Locale"
* @hibernate.collection-element
*  column="nlNameElement"
*  type="java.lang.String"
*  length="1000"
* @return
*/
public Map getNlNames() {
   return nlNames;
}


Is there a documentation about usage of XDoclet tags for Hibernate which covers everything? I mean one-to-one, many-to-one, one-to-many, Map, List, Set, Array, uni-directional, bi-directional and so on?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 15, 2003 6:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
On the surface it looks ok. I would try it an see how you go.
There is no complete documentaion of the Xdoclet tags with explanation on how to use them with examples. There is the Xdoclet docs, and a number of example projects with XDoclet markup. Your not the first to ask, it would be nice but its always a matter of time.


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.