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

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

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

revision 1.44 by joko, Thu Dec 4 01:01:50 2003 UTC revision 1.46 by jonen, Thu May 6 12:54:34 2004 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.46  2004/05/06 12:54:34  jonen
7    #  + bugfix related to multiple select-'filter'
8    #
9    #  Revision 1.45  2003/12/14 01:48:36  jonen
10    #  small HACK at _insertChildNode: some special Childnodes should not be created because existing objects have to be selected!
11    #  TODO: make this more generic, e.g. implement a special flag at Schema
12    #
13  #  Revision 1.44  2003/12/04 01:01:50  joko  #  Revision 1.44  2003/12/04 01:01:50  joko
14  #  + sendQuery now returns result even on crud=UPDATE  #  + sendQuery now returns result even on crud=UPDATE
15  #  #
# Line 525  sub getListFiltered { Line 532  sub getListFiltered {
532    my @results;    my @results;
533    $logger->debug( __PACKAGE__ . "->getListFiltered( nodename => '" . $in->{nodename} . "' )" );    $logger->debug( __PACKAGE__ . "->getListFiltered( nodename => '" . $in->{nodename} . "' )" );
534    
535    #print Dumper($filters);    #print "Filter_payload: " . Dumper($in->{filters}) . "\n";
536    
537    # 1. "Remote Object Handle" - get set of objects from odbms by object name    # 1. "Remote Object Handle" - get set of objects from odbms by object name
538    my $remote = $self->{_COREHANDLE}->remote($in->{nodename});    my $remote = $self->{_COREHANDLE}->remote($in->{nodename});
# Line 581  sub getListFiltered { Line 588  sub getListFiltered {
588        $orm_filter_tmp = $left->$op($right);        $orm_filter_tmp = $left->$op($right);
589      }      }
590    
591      if (not $orm_filter) {      if (!ref($orm_filter)) {
592        $orm_filter = $orm_filter_tmp;        $orm_filter = $orm_filter_tmp;
593      } else {      } else {
594        $orm_filter = $orm_filter->and($orm_filter_tmp);        $orm_filter = $orm_filter->and($orm_filter_tmp);
# Line 590  sub getListFiltered { Line 597  sub getListFiltered {
597    }    }
598    
599    $orm_query->{filter} = $orm_filter;    $orm_query->{filter} = $orm_filter;
600      
601      # debug point:
602      #print "Filter: " . Dumper($orm_query->{filter}) . "\n";
603    
604    # was:    # was:
605    
# Line 831  sub sendQuery { Line 841  sub sendQuery {
841        my $object = $cursor->getNextEntry();        my $object = $cursor->getNextEntry();
842    
843        $self->erase($object);        $self->erase($object);
844          $self->unload($object);
845    
846      } elsif ($crud eq 'CREATE') {      } elsif ($crud eq 'CREATE') {
847                
# Line 1020  sub createNode { Line 1031  sub createNode {
1031        $obj->{$_} = '0000-00-00 00:00:00';        $obj->{$_} = '0000-00-00 00:00:00';
1032      } elsif($attr_types->{$_} eq 'ref') {      } elsif($attr_types->{$_} eq 'ref') {
1033        if($attr_options->{$_}->{class}) {        if($attr_options->{$_}->{class}) {
1034          $obj->{$_} = $self->createNode($attr_options->{$_}->{class});          # HACK!!!
1035            # STANDALONE Objects (objects which make sense to instanciat alone) should not created automaticly
1036            # because they maybe exists and should only be SETTED not CREATED!
1037            # TODO: Create a flag at the scheme for that reason!
1038            #   (e.g child_node => 1 for child-nodes only like e.g. UserData)
1039            if($attr_options->{$_}->{class} eq 'NetPerson' || $attr_options->{$_}->{class} eq 'Event') {
1040              #$obj->{$_} = undef();
1041            } else {
1042              $obj->{$_} = $self->createNode($attr_options->{$_}->{class});
1043            }
1044        } else {        } else {
1045          #$obj->{$_} = undef();          #$obj->{$_} = undef();
1046        }        }

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.46

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