Lines 900-909
__PACKAGE__->has_many(
Link Here
|
900 |
|
900 |
|
901 |
return { |
901 |
return { |
902 |
"$args->{foreign_alias}.record_id" => { -ident => "$args->{self_alias}.ordernumber" }, |
902 |
"$args->{foreign_alias}.record_id" => { -ident => "$args->{self_alias}.ordernumber" }, |
903 |
|
903 |
"$args->{foreign_alias}.record_table" => __PACKAGE__->table, |
904 |
# TODO Add column additional_field_values.tablename to avoid subquery ? |
|
|
905 |
"$args->{foreign_alias}.field_id" => |
906 |
{ -in => \'(SELECT id FROM additional_fields WHERE tablename = "aqorders")' }, |
907 |
}; |
904 |
}; |
908 |
}, |
905 |
}, |
909 |
{ cascade_copy => 0, cascade_delete => 0 }, |
906 |
{ cascade_copy => 0, cascade_delete => 0 }, |