Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Created February 13, 2013 04:48
Show Gist options
  • Save rjattrill/4942377 to your computer and use it in GitHub Desktop.
Save rjattrill/4942377 to your computer and use it in GitHub Desktop.
my $lr = $dao->schema->join(qw/Parent grandparent/)->select(-where => {active => 1});
foreach my $p (@$lr) {
$p->expand('child', -where => {active => 1});
}
@rjattrill
Copy link
Author

This will filter Parent table by PARENT.ACTIVE = 1 and then expand CHILD table where CHILD.ACTIVE = 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment