[Dbix-class] Tracking "parent" resultset.
Bill Moseley
moseley at hank.org
Mon May 17 01:22:23 GMT 2010
On Sun, May 16, 2010 at 4:26 PM, Rob Kinyon <rob.kinyon at gmail.com> wrote:
> A given resultset can have more than one "parent." There are two
> obvious scenarios - subqueries (with the as_query feature) and unions
> (via DBIx::Class::Helpers).
Ok.
The main purpose of this is to be able to back track through a query that
I'd normally write with a single call to search so to can determine what
specific condition failed -- so can generate somewhat helpful log and error
messages. (i.e. "Why can't I access that Cd?").
> Just keep track of it on your own using an array. :)
>
By that do you mean this?
$new_rs =3D $rs->search( { active =3D> 1 } );
push @saved_rs, { comment =3D> 'Foo not active', rs =3D> $rs };
Thanks,
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100516/f4f=
0f8ec/attachment.htm
More information about the DBIx-Class
mailing list