Revision 6b17e62c
Von Tamino Steinert vor 6 Tagen 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 |
|
... | ... | |
343 | 346 |
} |
344 | 347 |
|
345 | 348 |
sub parent_variant { |
346 |
my ($parent_variant) = shift->parent_variants(@_); |
|
349 |
my $parent_variant; |
|
350 |
# returns a list, but we only care about the first element |
|
351 |
($parent_variant) = shift->parent_variants(@_); |
|
347 | 352 |
return $parent_variant; |
348 | 353 |
} |
349 | 354 |
|
Auch abrufbar als: Unified diff
Varianten: Helferfunktionen für Artikel angepasst