-->
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: Using annotation to map to java.util.Map
PostPosted: Fri May 19, 2006 6:51 pm 
Newbie

Joined: Tue Mar 01, 2005 6:58 pm
Posts: 7
How do I do the equivelant of the following Xdoclet using Hibernate annotations?

/**
* ...
* @hibernate.map table="settings" lazy="true"
* @hibernate.collection-key column="id"
* @hibernate.collection-element column="value" type="string"
* @hibernate.collection-index column="setting_key" type="string"
*/
public Map<String, String> getSettings() {...}

I've read through the documentation a number of times and have been playing with this for hours with no success.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 5:38 am 
Newbie

Joined: Thu May 18, 2006 12:23 pm
Posts: 6
I think it is impossible to have equivalent since in javax.peristence Map could be mapped only with key (map key) as property from value (map value) object.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 31, 2006 12:50 pm 
Newbie

Joined: Tue Mar 01, 2005 6:58 pm
Posts: 7
I'm reasonably certain it can't be done with JPA annotations but are there or will there be Hibernate specific annotations for doing this?


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.