using getTree() with a defined depth was not working
This commit is contained in:
parent
1dbbf236b3
commit
a38ee3e940
1 changed files with 2 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ sub getTree {
|
|||
}
|
||||
$nodes->{$self->get($class->keyColumn())} ||= $self;
|
||||
|
||||
return $nodes if (defined($maxDepth) && ($maxDepth-- > 0));
|
||||
return $nodes if (defined($maxDepth) && --$maxDepth < 0);
|
||||
|
||||
my @objs = $class->multiNew(
|
||||
parentId => $self->get($class->keyColumn()),%$p
|
||||
|
|
@ -321,6 +321,7 @@ sub new {
|
|||
my $class = shift;
|
||||
my $self = $class->SUPER::new(@_);
|
||||
$self->{daughters} ||= [] if $self;
|
||||
$self->attributes({});
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue