Revision history for DBIx::Class
+ - When adding relationships, it will throw an exception if you get the
+ foreign and self parts the wrong way round in the condition
+
0.08007 2007-09-04 19:36:00
- patch for Oracle datetime inflation (abram@arin.net)
- added on_disconnect_do
unless $cond;
$attrs ||= {};
+ # Check foreign and self are right in cond
+ if ( (ref $cond ||'') eq 'HASH') {
+ for (keys %$cond) {
+ $self->throw_exception("Keys of condition should be of form 'foreign.col', not '$_'")
+ if /\./ && !/^foreign\./;
+ }
+ }
+
my %rels = %{ $self->_relationships };
$rels{$rel} = { class => $f_source_name,
source => $f_source_name,
if($rel_table)
{
-
my $reverse_rels = $source->reverse_relationship_info($rel);
my ($otherrelname, $otherrelationship) = each %{$reverse_rels};
#Decide if this is a foreign key based on whether the self
#items are our primary columns.
- $DB::single = 1 if $moniker eq 'Tests::MBTI::Result';
# If the sets are different, then we assume it's a foreign key from
# us to another table.