-->
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: Enhancing PersistentSet - how to get properties?
PostPosted: Fri May 05, 2006 11:25 am 
Newbie

Joined: Fri May 05, 2006 11:15 am
Posts: 6
I am working on a UserCollectionType together with an enhancement of PersistentSet and I wonder is there a way (as far as I know now after my investigantions it might not be a simple way) to obtain (inside PersistentSet or at the level of instantiating it in my UserCollectionType)
info about property name (at the end of "one") and inverse property name (at the end of "many") when using my collection as custom in one-to-many connection?
For now I have found only PersistentCollection.getOwner() and CollectionPersister.getNodeName().

Thanks for any help.
Marcin

Hibernate version: 3.1.3


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 07, 2006 7:53 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
If you have the Configuration object, then yes, you can do it. However, hibernate does not keep a copy of that object, so if you need these details, you should either figure them out during configuration, or else hang on to the Configuration object.

Configuration.getCollectionMapping(name) gives you the object you need: use getOwnerEntityName and getReferencedPropertyName on that object.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 3:39 am 
Newbie

Joined: Fri May 05, 2006 11:15 am
Posts: 6
Thank you, that is a good path I think, it is still not easy to get Collection or Configuration inside the code but I will keep trying :)


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.