/[cvs]/nfo/perl/libs/Tangram/Storage.pm
ViewVC logotype

Diff of /nfo/perl/libs/Tangram/Storage.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by joko, Thu Apr 24 00:21:27 2003 UTC revision 1.10 by joko, Wed May 7 16:20:26 2003 UTC
# Line 705  sub load Line 705  sub load
705          my $row = _fetch_object_state($self, $id, $class);          my $row = _fetch_object_state($self, $id, $class);
706    
707      my $obj = $self->read_object($id, $class->{name}, $row);      my $obj = $self->read_object($id, $class->{name}, $row);
708      return undef unless defined $row;      #return undef unless defined $row;
709    
710      # ??? $self->{-residue} = \@row;      # ??? $self->{-residue} = \@row;
711    
# Line 723  sub reload Line 723  sub reload
723      my $class = $self->{schema}->classdef( $self->{id2class}{ int(substr($id, -$self->{cid_size})) } );      my $class = $self->{schema}->classdef( $self->{id2class}{ int(substr($id, -$self->{cid_size})) } );
724    
725          my $row = _fetch_object_state($self, $id, $class);          my $row = _fetch_object_state($self, $id, $class);
726      return undef unless defined $row;      #return undef unless defined $row;
727      _row_to_object($self, $obj, $id, $class->{name}, $row);      _row_to_object($self, $obj, $id, $class->{name}, $row);
728    
729      return $obj;      return $obj;
# Line 795  sub _fetch_object_state Line 795  sub _fetch_object_state
795    
796          $sth->execute($self->{export_id}->($id));          $sth->execute($self->{export_id}->($id));
797          my $state = [ $sth->fetchrow_array() ];          my $state = [ $sth->fetchrow_array() ];
798          croak "no object with id $id" unless (@{$state});          #croak "no object with id $id" unless (@{$state});
799          unless (@$state) {          #unless (@$state) {
800                  return undef unless $sth->err;          #       return undef unless $sth->err;
801                  croak "error during load of object id=$id: $sth->err";          #       croak "error during load of object id=$id: $sth->err";
802          }          #}
803          $sth->finish();          $sth->finish();
804    
805          return $state;          return $state;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed