From: Zbigniew Lukasiak Date: Thu, 21 May 2009 13:33:36 +0000 (+0200) Subject: using _resolve_condition X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=f8d97e749df641d0da641007bc6fda336defe71d;p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate using _resolve_condition --- diff --git a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm index c07ae6b..b4ba9b8 100644 --- a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm +++ b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm @@ -2,7 +2,7 @@ use strict; use warnings; package DBIx::Class::ResultSet::RecursiveUpdate; -use version; our $VERSION = qv('0.007'); +use version; our $VERSION = qv('0.008'); use base qw(DBIx::Class::ResultSet); @@ -162,8 +162,13 @@ sub _update_relation { my ( $self, $name, $updates, $object, $info ) = @_; my $related_result = $self->related_resultset($name)->result_source->resultset; - my $resolved = - $self->result_source->resolve_condition( $info->{cond}, $name, $object ); + my $resolved; + if( $self->result_source->can( '_resolve_condition' ) ){ + $resolved = $self->result_source->_resolve_condition( $info->{cond}, $name, $object ); + } + else{ + $resolved = $self->result_source->resolve_condition( $info->{cond}, $name, $object ); + } # warn 'resolved: ' . Dumper( $resolved ); use Data::Dumper; $resolved = undef diff --git a/t/var/dvdzbr.db b/t/var/dvdzbr.db index fd45f65..5a07a70 100644 Binary files a/t/var/dvdzbr.db and b/t/var/dvdzbr.db differ