It is an absolutely essential part of Hibernate's architecture that you don't share instances between concurrent transactions!
> net.sf.hibernate.HibernateException: Illegal attempt to associate a > collection with two open sessions > > I get the preceding error when... > > A user issues a query to select an object holding a collection and at the > same time another user updates that object. > > Is it true, that in the same SessionFactory, you cannot update and read an > object in 2 different Sessions > which contains a collection, at the same time? > > I saw posted back in January...but did not find a solution. Should I just > ditch the one-to-many association? > > "This exception occurs when (during a flush) Hibernate discovers a new > reference to a collection that is currently "owned" by another open > Session. You should verify that you are closing all your Sessions. (It > is nothing to do with the query itself; Hibernate simply decided that > the query required that a flush precede the > Query.) " > > > my config... > > <set name="batches" lazy="false" order-by="batch_no asc"> > <key column="survey_id"/> > <one-to-many class="com.lsr.pamm2.generic.model.SurveyBatch"/> > </set> > > Thanks, > Joseph Toth > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel