Thread:
 Another approach? 
 eraymond   04 Nov 2005, 15:52 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: eraymond (04 Nov 2005, 15:52) Replies: 0, Views: 26457
Subject: Another approach?
Is there a way to indicate in the mapping that the "list" of 
politicians is lazy, but the elements of the list are not lazy?  The
idea would be that if you loaded an object which contained such a list,
it would not be loaded until you accessed it.  But as soon as you
accessed it, the list would immediately fetch all the members ..
presumably getting the proxy to be the proper subclass 9and avoiding the
problem).

In many cases the performance would be as good or better than a lazy
collection of lazy politicians (which I think describes the example in
the article above.)

P.S.  It feels *very* odd for the perstance framework to be driving
structural changes to the users java code (e.g., use this design pattern
to avoid this error from a library).
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]