1
2
3
4
5
6
7
8
9
10
my $rs = $schema->resultset('Artikel')->search(
{
'art2atts.id_at' => $aid,
def_attgroup => { IN => \@gids }
},
{
select => ['artnum', 'artname', 'text', ],
prefetch => ['art2atts'],
order_by => 'artnum',
});
1
2
3
4
5
6
7
8
9
10
while ( my $row = $rs->next ) {
# Welchen Artikel haben wir denn hier?
say "Artikel: ",$row->artnum," Name: ",$row->artname;
# Welche Attribute hat dieser Artikel?
while ( my $inner_row = $row->art2atts->next() ) {
say "Attribut-Id: ",$inner_row->id;
}
}
1
2
3
4
5
6
7
8
9
10
while ( my $row = $rs->next ) {
# Welchen Artikel haben wir denn hier?
say "Artikel: ",$row->artnum," Name: ",$row->artname;
# Welche Attribute hat dieser Artikel?
my $irs = $row->art2atts;
while ( my $inner_row = $irs->next() ) {
say "Attribut-Id: ",$inner_row->id;
}
}
for my $inner_row ($row->art2atts->all()) {
for my $inner_row ($row->art2atts()) {
[% c.req.scalar.headers.scalar.header("User-Agent") %]