cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Baldwin <>
Subject Re: lazy loading (slightly OT)
Date Wed, 28 Mar 2012 16:50:48 GMT
Good points and I agree with you.

As for the "how in the world" comment, I actually know the answer to this (as I had to research
this).  Technical people will often to "proof of concept" testing (to verify that what the
lib developers claim, is actually true).  However, management-oriented (i.e. less technically
adept) do not have the time, funding, or perhaps skill sets to understand the results of "proof
of concept" tests, much less actually doing the tests themselves.  

Sooooo, what they resort to is "follow the leader" - i.e. what did my competitor use in his
project - must be good - so I will use it.  End of story, go home, have a beer.

This is analagous to technical people saying: 'what accounting package do you use' - must
be good - I will do the same thing.

This is why I am hoping that Cayenne can get more high-profile projects so that the "follow
the leader" pattern will assist in their dissemination.

On Mar 28, 2012, at 11:59 AM, Robert Zeigler wrote:

> Having dealt with this recently in hibernate...
> Hibernate's support for lazy fetching sucks. :) It's there, and it's the default, when
possible. But, for instance, toOne relationships can generally only be lazily fetched if they
are also mandatory (see, eg:
 As a workaround, the hibernate community suggests mapping the toOne as a toMany and creating
custom getters/setters  (or else build-time instrumentation). 
> Every time I'm forced (for client projects) to use hibernate, I find myself wondering
how in the /world/ it /ever/ became the dominant player in the ORM world.
> Robert
> On Mar 28, 2012, at 3/289:19 AM , Joe Baldwin wrote:
>> on the "aside":
>> the last time we discussed this, it appears that Hibernate *implements* the rules
differently (and very poorly in my humble opinion), and *so* differently that I would argue
that they don't support it vey well.  The methodologies behind the Cayenne relationship handling
are quite advanced and as "idiot proof" as Java GC.
>> On Mar 28, 2012, at 10:04 AM, Durchholz, Joachim wrote:
>>>> I think what Michael was saying was, that the answer is that 'lazy loading
>>>> of data object relationship data is supported and is the default mechanism'.
>>> That's what I read, too.
>>>> (In fact this is one of the main strengths of Cayenne in my opinion)
>>> On a tangent, I don't think this can be advertised as a special strength of Cayenne.
>>> Think about it: Any ORM that does not do by-default lazy association loading
will quickly find itself loading the entire database. If it wasn't built into the ORM right
from the beginning, the ORM is essentially useless and will either die or get that feature
added ASAP.
>>> The more interesting comparison would be how easily an application developer
could specify when to load eagerly.
>>> (Not that I'm in a position to actually do such a comparison. ;-) )

View raw message