-->
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: Can Hibernate persist a Collection of Objects in save-Metho?
PostPosted: Sun Feb 20, 2005 5:20 pm 
Newbie

Joined: Sun Feb 20, 2005 5:09 pm
Posts: 1
Hallo,

I so far wasn't able to find a method to persist a Collection of Objects. I only managed to persist one single instance of an object like:

session.save(MyObjectInstance);

But I have an Array of these objects. When trying to persist an ArrayList of "MyOBjectInstance"Objects I get the following exception:

net.sf.hibernate.MappingException: No persister for: java.util.ArrayList

Isn't here a default persister for ArrayLists or for any other kind of Collection? If here is one, where do I have to configure this persister.

What is your suggested approach solving the problem, iterating over the ArrayList and saving each record individually or is there an other alternative to solve this problem?

Thank you very much
jan


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.