merging 7.1.3 fixes
This commit is contained in:
parent
568a02a6af
commit
7571dbca39
3 changed files with 16 additions and 5 deletions
|
|
@ -1459,12 +1459,12 @@ sub new {
|
|||
# got properties from cache
|
||||
} else {
|
||||
my $sql = "select * from asset";
|
||||
my $where = " where asset.assetId=".$session->db->quote($assetId);
|
||||
foreach my $definition (@{$class->definition($session)}) {
|
||||
$sql .= " left join ".$definition->{tableName}." on asset.assetId="
|
||||
.$definition->{tableName}.".assetId and ".$definition->{tableName}.".revisionDate=".$revisionDate;
|
||||
$sql .= ",".$definition->{tableName};
|
||||
$where .= " and (asset.assetId=".$definition->{tableName}.".assetId and ".$definition->{tableName}.".revisionDate=".$revisionDate.")";
|
||||
}
|
||||
$sql .= " where asset.assetId=".$session->db->quote($assetId);
|
||||
$properties = $session->db->quickHashRef($sql);
|
||||
$properties = $session->db->quickHashRef($sql.$where);
|
||||
return undef unless (exists $properties->{assetId});
|
||||
$cache->set($properties,60*60*24);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue