[open-ils-commits] r18417 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Oct 20 15:36:39 EDT 2010
Author: senator
Date: 2010-10-20 15:36:34 -0400 (Wed, 20 Oct 2010)
New Revision: 18417
Modified:
branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
Backport r18416 from trunk: a/t use rstore to flesh if cstore not available
Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2010-10-20 19:35:42 UTC (rev 18416)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2010-10-20 19:36:34 UTC (rev 18417)
@@ -482,6 +482,7 @@
my $label = shift;
my $path = shift;
my $ed = shift;
+ my $red = shift;
my $outer = 0;
if (!$ed) {
@@ -531,7 +532,11 @@
my $str_path = join('.', @$path);
$obj = $_object_by_path_cache{$def_id}{$str_path}{$step}{$ffield}{$lval} ||
- $ed->$meth( ($multi) ? { $ffield => $lval } : $lval);
+ (
+ (grep /cstore/, @{
+ Fieldmapper->publish_fieldmapper->{$fclass}{controller}
+ }) ? $ed : ($red ||= new_rstore_editor(xact=>1))
+ )->$meth( ($multi) ? { $ffield => $lval } : $lval);
$_object_by_path_cache{$def_id}{$str_path}{$step}{$ffield}{$lval} ||= $obj;
}
@@ -548,7 +553,7 @@
for (@$obj_list) {
my @path_clone = @$path;
- $self->_object_by_path( $_, $collector, $label, \@path_clone, $ed );
+ $self->_object_by_path( $_, $collector, $label, \@path_clone, $ed, $red );
}
$obj = $$obj_list[0] if (!$multi || $rtype eq 'might_have');
@@ -591,7 +596,10 @@
}
}
- $ed->rollback if ($outer);
+ if ($outer) {
+ $ed->rollback;
+ $red->rollback if $red;
+ }
return $obj;
}
More information about the open-ils-commits
mailing list