Issue 45: Add the ability to filter relationships
Reported by ore...@drjays.com, Feb 2, 2010
Please add the ability to filter relationships with a where() clause or
similar.

Example:
  my $invoice_lines =
$dbh->invoice->get($invoice_id)->invoice_items->where(status => 'active');

Currently, you have to code it like this:

my $invoice = $dbh->invoice->get($invoice_id);
my $invoice_lines = $invoice->invoice_items;
my @good;
while (my $line = $invoice_lines->next()) {
    next unless ($line->status eq 'active');
    # other processing here...
}

As you can see, not only is that very inefficient to code, but it requires
that you select and fetch ALL records and then filter in Perl. It would be
far superior to only fetch the records you wanted, based on a where()
clause or other filtering mechanism.
Sep 6, 2010
#1 dan...@drjays.com
(No comment was entered for this change.)
Labels: fixed_in_1.1
Sep 7, 2010
#2 dan...@drjays.com
Fixed in 1.1. Please verify
Status: Fixed