fixed: getLineage with joinClass only joins first table in definition

This commit is contained in:
Graham Knop 2008-04-10 22:15:09 +00:00
parent 55dbc180bb
commit 74381281fa
2 changed files with 2 additions and 2 deletions

View file

@ -23,6 +23,7 @@
- fixed: Users without karma can transfer karma by rating posts - fixed: Users without karma can transfer karma by rating posts
- fixed: gateway macro not usable in links in rich editor - fixed: gateway macro not usable in links in rich editor
- fixed: iCal feeds don't update properly when events are changed - fixed: iCal feeds don't update properly when events are changed
- fixed: getLineage with joinClass only joins first table in definition
7.5.9 7.5.9
- fixed: Collaboration System attachments follow site's max size instead of CS's - fixed: Collaboration System attachments follow site's max size instead of CS's

View file

@ -398,11 +398,10 @@ sub getLineage {
$self->session->errorHandler->fatal("Couldn't compile asset package: ".$className.". Root cause: ".$@) if ($@); $self->session->errorHandler->fatal("Couldn't compile asset package: ".$className.". Root cause: ".$@) if ($@);
} }
foreach my $definition (@{$className->definition($self->session)}) { foreach my $definition (@{$className->definition($self->session)}) {
unless ($definition->{tableName} eq "asset") { unless ($definition->{tableName} eq "asset" || $definition->{tableName} eq "assetData") {
my $tableName = $definition->{tableName}; my $tableName = $definition->{tableName};
$tables .= " left join $tableName on assetData.assetId=".$tableName.".assetId and assetData.revisionDate=".$tableName.".revisionDate"; $tables .= " left join $tableName on assetData.assetId=".$tableName.".assetId and assetData.revisionDate=".$tableName.".revisionDate";
} }
last;
} }
} }
# formulate a where clause # formulate a where clause