|
From: Ray Z. <rz...@co...> - 2002-08-12 13:27:45
|
Hi Chris,
Thanks for including the refetch() and field_update() in the latest
SPOPS. Could you clarify what you were referring to in the Changes
file:
>This updates the values for a limited number of fields, or performs
>an update across several objects at once.
... and in the docs for field_update() ...
>Note that this rubs against the grain of one object == one update. But
>it is quite useful, and useful things tend to stick around.
I never envisioned doing updates across multiple objects with a
single field_update() call, though it does sound useful. Does it
really work? I assume you'd call it as a class method and specify a
where clause, right? Something like ...
Class->field_update( { status => 'OFF' },
{ where => 'output = 0' } );
But what about the calls to $self->id_clause( undef, undef, $p ) in
field_update()? ... ah, that just returns undef, eh? Pretty slick.
So, assuming I've got it right, maybe we should include an example of
this in the docs as well ... it never would have occurred to me if
you hadn't hinted at it in the Changes file.
--
Ray Zimmerman / e-mail: rz...@co... / 428-B Phillips Hall
Sr Research / phone: (607) 255-9645 / Cornell University
Associate / FAX: (815) 377-3932 / Ithaca, NY 14853
|