Author: spadkins
Date: Tue Jun 23 07:06:29 2009
New Revision: 12886
Modified:
p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm
Log:
enable option-driven setting of the physical tables in the joined select
Modified: p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm (original)
+++ p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm Tue Jun 23 07:06:29 2009
@@ -2972,6 +2972,9 @@
$table_def = $self->{table}{$table};
return if (!defined $table_def);
+ my $context = $self->{context};
+ my $context_options = $context->{options};
+
$native_table = $table; # assume the table name is a physical one
$native_table = $table_def->{native_table} if ($table_def->{native_table});
@@ -3145,6 +3148,10 @@
push(@$tablealiases, $tablealias);
$tablealias_seen{$tablealias} = 1;
}
+
+ if ($tablealias_def->{table} && $tablealias_def->{table} =~
/[\{\}]/) {
+ $tablealias_def->{table} =
$self->substitute($tablealias_def->{table}, $context_options);
+ }
}
}