Author: spadkins
Date: Mon Oct  2 14:00:42 2006
New Revision: 7867

Modified:
   p5ee/trunk/App-Repository/lib/App/RepositoryObject.pm

Log:
allow set([column_list]) to use object attribute values by default

Modified: p5ee/trunk/App-Repository/lib/App/RepositoryObject.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/RepositoryObject.pm       (original)
+++ p5ee/trunk/App-Repository/lib/App/RepositoryObject.pm       Mon Oct  2 
14:00:42 2006
@@ -131,6 +131,7 @@
 sub set {
     my ($self, $attrib, $value, $options) = @_;
     die "Can't set values: _key not defined on object[$self->{_table}]" if (! 
defined $self->{_key});
+    $value = $self if (! defined $value && ref($attrib) eq "ARRAY");
     my $nrows = $self->{_repository}->set($self->{_table}, $self->{_key}, 
$attrib, $value);
     if (ref($attrib) eq "ARRAY") {
         for (my $i = 0; $i <= $#$attrib; $i++) {

Reply via email to