[Bast-commits] r9045 - DBIx-Class/0.08/trunk/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Mar 24 10:44:50 GMT 2010
Author: ribasushi
Date: 2010-03-24 10:44:50 +0000 (Wed, 24 Mar 2010)
New Revision: 9045
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm
Log:
One missed step
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm 2010-03-24 10:33:03 UTC (rev 9044)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSource.pm 2010-03-24 10:44:50 UTC (rev 9045)
@@ -519,6 +519,9 @@
return @{shift->_primaries||[]};
}
+# a helper method that will automatically die with a descriptive message if
+# no pk is defined on the source in question. For internal use to save
+# on if @pks... boilerplate
sub _pri_cols {
my $self = shift;
my @pcols = $self->primary_columns
@@ -1465,7 +1468,7 @@
}
#my @col = map { (/^self\.(.+)$/ ? ("${as_prefix}.$1") : ()); }
# values %{$rel_info->{cond}};
- $collapse->{".${as_prefix}${pre}"} = [ $rel_source->primary_columns ];
+ $collapse->{".${as_prefix}${pre}"} = [ $rel_source->_pri_cols ];
# action at a distance. prepending the '.' allows simpler code
# in ResultSet->_collapse_result
my @key = map { (/^foreign\.(.+)$/ ? ($1) : ()); }
More information about the Bast-commits
mailing list