-->
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: lazy does not work for collection association? Maybe ...
PostPosted: Tue Dec 06, 2005 9:35 am 
Newbie

Joined: Tue Oct 11, 2005 4:38 pm
Posts: 7
.. because .of your setxxx() methods

I just wanted to post a situation, in that lazy loading does not work. I took me some time to find it out. The code worked well. But as we later wanted to use the "lazy" feature, it just stayed unlazy:

Code:
    public void setChildren( Set children )
    {
       if ( children == null || children.isEmpty() )
          return;

       for ( Iterator iter = children.iterator(); iter.hasNext(); )
       {
          if ( !( iter.next() instanceof TreePermissionGroupNode) )
             throw ( new IllegalArgumentException("Only TreePermissionGroupNodes allowed") );
       }

       _children = children;
    }



Well, hibernates tries to set a collection proxy here, but just in the set method, it is forced to retrieve the data.


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.