-->
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: How can I convert PersistentSet into HashSet?
PostPosted: Fri Jun 13, 2008 6:27 pm 
Newbie

Joined: Thu May 08, 2008 2:16 pm
Posts: 3
Hi All,

I'm wondering if there is any way to convert Persistent Collection into user defined collection through Hibernate Annotation? For example, if I have an @OneToMany mapping with the return collection Set, then the real implementation for the Set object I obtained should be PersistentSet. I don't want that in my implementation, so what kind of method I can use to convert PersistentSet into HashSet for example. Thanks.


Allen

_________________
Yijia (Allen) Zhao

Research In Motion
Software Developer


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 14, 2008 12:46 am 
Regular
Regular

Joined: Sun Apr 13, 2008 3:04 am
Posts: 71
Location: Bangalore
The default impl. does use PersistantSet.. for all set references. You could customise this using the doc at page 257 of book Java Persistance with Hibernate. Bit complex but should be possible.

Regards,
Nagendra

_________________
Raja Nagendra Kumar,
C.T.O
http://www.tejasoft.com
TejaSoft - Specialists in Code Audit, Unit Testing and Merciless Re-factoring - Engineering Crisis Turnaround Experts


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.