From: Luke Saunders Date: Fri, 26 Oct 2007 10:53:26 +0000 (+0000) Subject: the checks in reverse_relationship_info are less ambiguous X-Git-Tag: v0.08010~42 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3fb2641965a608c9ee6bb4f133bfa2630854086;p=dbsrgits%2FDBIx-Class.git the checks in reverse_relationship_info are less ambiguous --- diff --git a/Changes b/Changes index 2b81239..5dbda34 100644 --- 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 diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index d23c765..23fdd40 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -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;