Revision f744a501
Von Tamino Steinert vor 11 Monaten hinzugefügt
SL/DB/Part.pm | ||
---|---|---|
119 | 119 |
map_from => 'parent_variant', |
120 | 120 |
map_to => 'variant', |
121 | 121 |
type => 'many to many', #should be 'one to many' but has no map_class |
122 |
manager_args => { |
|
123 |
sort_by => "SUBSTRING(variant.partnumber FROM '([0-9]+)\$')::BIGINT ASC, variant.partnumber ASC" |
|
124 |
} |
|
122 | 125 |
} |
123 | 126 |
); |
124 | 127 |
|
... | ... | |
342 | 345 |
} |
343 | 346 |
|
344 | 347 |
sub parent_variant { |
345 |
my ($parent_variant) = shift->parent_variants(@_); |
|
348 |
my $parent_variant; |
|
349 |
# returns a list, but we only care about the first element |
|
350 |
($parent_variant) = shift->parent_variants(@_); |
|
346 | 351 |
return $parent_variant; |
347 | 352 |
} |
348 | 353 |
|
Auch abrufbar als: Unified diff
Varianten: Helferfunktionen für Artikel angepasst