Lets say we load an object of type EntityA, which has a proxy.  The
session cache now contains a proxy for that object.

Now lets say we load a collection of EntityA objects, one of which is
the instance we loaded earlier.

What I find in that collection is a set of initialized EntityA objects,
_except_ the instance you loaded earlier.  That will be an uninitialized
proxy.

Why not initialize the proxy with the data that came back from the
collection query?  The expensive part is going to the db, we have the
data, why not use it?

Unfortunately the current arrangement means I have to walk through every
collection and make sure each entity is initialized.  Not only annoying,
but requires additional queries to populate the objects.

Jeff Schnitzer
[EMAIL PROTECTED]

BTW, I have a patch for a proxy initialize-on-equals="true/false"
setting, but I can't submit it until sf's CVS allows me to sync again
:-(


-------------------------------------------------------
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

Reply via email to