This one time, at band camp, Paul Danckaert said:
PD>I too would agree that solution 1 would be the best aproach, if
PD>size/absolute/relative are going to be offered. Object iteration would
PD>be.. nasty at best. And the straight count is limited.
PD>
PD>Is there an easy way to extract a non-JOIN'ed query to use for these
PD>operations? I guess that we would need to issue the query with
PD>appropriate constraints/ordering but without the join information, and
PD>then store that in an array as a lookup for the size/relative/absolute
PD>functions. Theoretically it could be lazy queried and issued only when
PD>necessary, but then you could have some interesting transactional
PD>problems, so perhaps not.
PD>
PD>Does anybody use these methods with complex objects, and how do you
PD>solve these problems?
PD>
PD>paul
PD>
PD>On Thu, 2002-11-21 at 14:14, Matthew Baird wrote:
PD>
PD>> unfortunately you are correct (I wrote that code)
PD>>
PD>> with the dependent objects and the join to load them all, the absolute, .size and
.relative are all "random"
PD>>
PD>> unfortunately, there is no "easy" way to solve this:
PD>> 1. Change the way Castor loads dependent objects (2 queries) (solves all .size,
.relative and .absolute issues)
PD>> 2. Change the .size, .absolute, and .relative to iterate through all objects
(UGGGGG) (solves all .size, .relative and .absolute issues)
PD>> 3. Change the .size to execute the appropriate count(*) (solves only the the
.size problem)
PD>>
PD>> Maybe there is another way I'm not familiar with.
PD>>
PD>> I would recommend going with 1, as it is the best from a performance point of
view, otherwise there really isn't a reason to put this functionality into castor,
just have it in your app.
Paul, Matthew,
IMHO, you are both correct. The best fix for this would be to change
the way that Castor loads dependent objects (so as to remove any
need (or almost any need) for the JOIN syntax). This issue has
certainly been discussed in the past and it's something I'd like
to do eventually. However, right now we're (Mickael and I) simply
trying to reduce the number of bugs.
I'm not trying to avoid changing this functionality, it's really
just a matter of time (unfortunately working on Castor is not my
full-time job >:-().
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev