my $rs = $schema->resultset('Topic')->search(undef); foreach my $t ( $rs->all() ) { say "t: " . $t->topic(); # geht my $brs = $schema->resultset('Board')->search({topic_id => $t->topic_id()}); say "board count: " . $brs->count(); # geht nicht my $boards = $t->boards(); say "board count: " . $boards->count(); }