[odb-users] Lazy Relationships?

Christian Sell christian at gsvitec.com
Tue Sep 22 11:32:17 EDT 2015


> Secondly, consider a to-many relationship: If you JOIN the
> relationship data to the same SELECT statement, you are going to
> fetch N copies of the object.
 
outer join. It's been done before. Fetching ids only is another performance
killer (N+1 problem). Of course there must be switches to allow adaptation to
the concrete data model (BLOBs etc.). But hey, it is as it is - my application
is not a big data cruncher.

> Now, you may want to get even lazier and not even load object ids.
> This you can only do by placing 'objects' into a lazy-loaded section.
> In fact, the chapter on sections talks about this two-level laziness.
 
yes, and in fact, I mentioned sections as the only way I had found to achieve
"full lazyness". However, this is not feasible because, as I said, I am mapping
classes that I cannot modify. Therefore my question was if I could achieve the
same with custom relationship (container) and accompanying container_traits

chris



More information about the odb-users mailing list