-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate and Collections
PostPosted: Mon Jul 23, 2007 12:03 pm 
Newbie

Joined: Mon Jul 23, 2007 11:58 am
Posts: 15
Location: New Jersey
Hey,

I am using hibernate to get at a collection of entities persisted in the database. I also created a custom collection class that i want to use to add additional behavior when objects are being added to the collection within hibernate. The Query.list method is returning an ArrayList. Is there anyway I can tell hibernate to use my custom collection when building the collection.

Some code to clarify



Code:
CorporateActionList entityList;
if(paramValues == null || paramValues.length == 0){
   entityList = (CorporateActionList) hibernateTemplate.findByNamedQuery(namedQuery); //always returns arraylist


What facility is available to inform spring/hibernate that I would like a collection of type CorporateActionList to be returned?

Thanks.

Roy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.