-->
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: Outer-join error.
PostPosted: Fri Feb 13, 2004 6:21 am 
Regular
Regular

Joined: Thu Aug 28, 2003 6:30 am
Posts: 58
I've got such mapping:
Code:
        <bag
            name="properties"
            table="multilanguage_property"
            lazy="false"
            inverse="true"
            cascade="all"
            outer-join="true"
            where="disc like 'fcat'"
        >
            <jcs-cache
                usage="read-write"
             />

              <key
                  column="ref_id"
              />

              <one-to-many
                  class="com.mypackage.language.property.FeedbackCategoryProperty"
              />
        </bag>


and when outer-join="true" , there's an error
Code:
13:12:47,145 ERROR AssertionFailure:22 - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
net.sf.hibernate.AssertionFailure: cannot access loading collection
        at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:196)
        at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:71)
        at net.sf.hibernate.collection.Bag.size(Bag.java:232)


but when i set outer-join="false", then everything is OK.
Is it bug or my mistake?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 8:21 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
Show the code that you execute from when you open the session to the error, plus the complete debug trace.

If the code is lengthly, simplify the case to a class to a simple main method that duplicates the problem.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 9:18 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
We had this allready, I suppose you are accessing other currently loading collections somewhere in your hashcode or equals methods. Thats bad. If not, show more (stacktrace for example)


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.