Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Created February 13, 2013 04:48
Show Gist options
  • Save rjattrill/4942369 to your computer and use it in GitHub Desktop.
Save rjattrill/4942369 to your computer and use it in GitHub Desktop.
Expand with criteria in DBIDM
my $lr = $dao->schema->join(qw/ProcessExecution process domain/)->select(%where);
foreach my $pe (@$lr) {
$pe->expand('process');
my $label = "Domain: " . $pe->{domain} . "\t\tProcess: " . $pe->{process} . "\t\tOperation Date: " . $pe->{operation_date};
$pe->{label} = $label;
if ($tree gt 1) {
$pe->expand('task_actions', -where => {deactivated => undef});
if ($tree gt 2) {
foreach my $ta (@{$pe->{task_actions}}) {
$ta->expand('task_parameter_values', -where => {deactivated => undef});
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment