[PEAK] model unit tests and a non-association QueryLink
R. David Murray
rdmurray at bitdance.com
Wed Nov 10 00:17:30 EST 2004
On Tue, 9 Nov 2004, Phillip J. Eby wrote:
> Yes, use a QueryLink referencing a QueryDM. One way to do this "cheaply"
> is to make your existing transaction-list QueryDM take a key that's an
> '(id,unbilled_only)' tuple, that it then uses when querying the SQL
> backend. Then, the account state ends up with two query links, one to the
> full transaction list, the other to the unbilled ones. Only the ones you
> actually use will be loaded.
This is cheaper just because I don't have to write/instantiate two different
QueryDMs? But now I'm afraid I'm back to not understanding how the QueryLink
(called from the derived feature's get method?) knows when to recompute
its list. I think I'm more confused now (*frown*).
> Also, keep in mind that QueryDM's need to use preloadState() on the DM
> whose objects they're loading, so that you don't have to go back and load
> those objects' states again.
Yes, that I gathered from the examples I've been working from.
--David
More information about the PEAK
mailing list