Lines 1596-1602
sub _get_tt_params {
Link Here
|
1596 |
croak "ERROR processing table $table. Wrong API call."; |
1596 |
croak "ERROR processing table $table. Wrong API call."; |
1597 |
} |
1597 |
} |
1598 |
my $key = $pk ? $pk : $fk; |
1598 |
my $key = $pk ? $pk : $fk; |
1599 |
my $objects = $module->search( { $key => { -in => $values } } ); |
1599 |
# $key does not come from user input |
|
|
1600 |
my $objects = $module->search( |
1601 |
{ $key => $values }, |
1602 |
{ |
1603 |
# We want to retrieve the data in the same order |
1604 |
# FIXME MySQLism |
1605 |
# field is a MySQLism, but they are no other way to do it |
1606 |
# To be generic we could do it in perl, but we will need to fetch |
1607 |
# all the data then order them |
1608 |
@$values ? ( order_by => \[ "field($key, " . join( ', ', @$values ) . ")" ] ) : () |
1609 |
} |
1610 |
); |
1600 |
$params->{ $config->{$table}->{plural} } = $objects; |
1611 |
$params->{ $config->{$table}->{plural} } = $objects; |
1601 |
} |
1612 |
} |
1602 |
elsif ( $ref eq q{} || $ref eq 'HASH' ) { |
1613 |
elsif ( $ref eq q{} || $ref eq 'HASH' ) { |
1603 |
- |
|
|