the checks in reverse_relationship_info are less ambiguous
Luke Saunders [Fri, 26 Oct 2007 10:53:26 +0000 (10:53 +0000)]
Changes
lib/DBIx/Class/ResultSource.pm

diff --git a/Changes b/Changes
index 2b81239..5dbda34 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,4 +1,6 @@
 Revision history for DBIx::Class
+        - ResultSource::reverse_relationship_info can distinguish between 
+          sources using the same table
         - Row::insert will now not fall over if passed duplicate related objects
         - When adding relationships, it will throw an exception if you get the
           foreign and self parts the wrong way round in the condition
index d23c765..23fdd40 100644 (file)
@@ -640,7 +640,7 @@ sub reverse_relationship_info {
     my $otherrel_info = $othertable->relationship_info($otherrel);
 
     my $back = $othertable->related_source($otherrel);
-    next unless $back->name eq $self->name;
+    next unless $back->source_name eq $self->source_name;
 
     my @othertestconds;