-->
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: EJB3 spec Q: Maps with key persisted from map
PostPosted: Mon Dec 19, 2005 6:41 am 
Beginner
Beginner

Joined: Wed Dec 17, 2003 2:54 pm
Posts: 26
Location: Oslo, Norway
The examples I have run over all have the column used as a MapKey as a part of the mapped element, and it seems you have to set the key explicitly in the value object.

The annotation pattern seems to be that the column mentioned by MapKey should also be a @Basic in the mapped object.

I think I possibly may have misinterpreted something. Isn't it possible to go

Code:
Map myMap = new HashMap();
myMap.put("key", myMappedObject);
myObject.setMap(myMap);
session.save(myObject)


and have the EJB3 engine persist "key" without explicitly setting the associated property in the mapped object?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 6:57 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This is ANN-1 in JIRA but will not be part of the spec

_________________
Emmanuel


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.