Emmanuel Bernard wrote:


(1) make lazy default to true on both <class> and <collection> mapping elements; if a class cannot be proxied, laziness is transparently disabled; make it clear that we intend laziness to be used 99% of the time


Most controversial part but I'm +1 from a pragmatic perspective. However, I can understand people thinking it's a bit too much since it's not 100% sure you can lazy, and the '1 query to bind them all' is a very common urban legend.

I've implemented it to log a WARN if we cant create a proxy.


(4) introduce the fetch attribute, where, at least initially, the options are fetch="join|select"; eventually we may add other options like fetch="immediate-select"


+1 immediate-select means unlazy but wo join, correct ?

Correct

Questions:

* The default should be fetch="select" for collections, what
 should the default be for to-one associations? I suppose
 that purely for backward compatibility purposes we need
 fetch="auto|join|select", where auto is the default, and
 chooses "select" for a lazy-enabled class.


To stay consistent with (4), add a default value (I know one more). I've never been fond of the 'auto'-magical configuration. It has confused tons of guys I've worked with.

Since we expect everything to be lazy=true now, the behavior becomes MUCH more predictable. Basically, it will almost always be "select", when unspecified.


We *must* provide a clear and clean material on what to do to lazy, fetch a collection a to-one etc... We'll need a clean separation between H2 and H3 docs (whether wiki or not).

Yes, certainly.



--
Gavin King
+61 410 534 454
+1 404 822 8349
callto://gavinking

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com




------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to