/[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.43 by jonen, Wed Jul 2 11:07:12 2003 UTC revision 1.45 by jonen, Sun Dec 14 01:48:36 2003 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.45  2003/12/14 01:48:36  jonen
7    #  small HACK at _insertChildNode: some special Childnodes should not be created because existing objects have to be selected!
8    #  TODO: make this more generic, e.g. implement a special flag at Schema
9    #
10    #  Revision 1.44  2003/12/04 01:01:50  joko
11    #  + sendQuery now returns result even on crud=UPDATE
12    #
13  #  Revision 1.43  2003/07/02 11:07:12  jonen  #  Revision 1.43  2003/07/02 11:07:12  jonen
14  #  re-activate filtering of results *after* results are fetched from tangram  #  re-activate filtering of results *after* results are fetched from tangram
15  #    (needed for e.g. UserManagment)  #    (needed for e.g. UserManagment)
# Line 183  use Data::Mungle::Transform::Deep qw( ex Line 190  use Data::Mungle::Transform::Deep qw( ex
190  # get logger instance  # get logger instance
191  my $logger = Log::Dispatch::Config->instance;  my $logger = Log::Dispatch::Config->instance;
192    
193    #$Tangram::TRACE = *STDOUT;
194    
195  # this holds the complete instantiated schema from tangram  # this holds the complete instantiated schema from tangram
196  my $schema_tangram;  my $schema_tangram;
# Line 809  sub sendQuery { Line 817  sub sendQuery {
817        my $options = { utf8 => 1, php => 1 };        my $options = { utf8 => 1, php => 1 };
818        merge_to($object, $query->{payload}, $options);        merge_to($object, $query->{payload}, $options);
819    
820          #print Dumper($object);
821          
822        # Execute update operation at orm.        # Execute update operation at orm.
823        $self->update($object);        $self->update($object);
824          $result = $self->createResult([ $object ]);
825            
826      } elsif ($crud eq 'DELETE') {      } elsif ($crud eq 'DELETE') {
827    
# Line 1013  sub createNode { Line 1024  sub createNode {
1024        $obj->{$_} = '0000-00-00 00:00:00';        $obj->{$_} = '0000-00-00 00:00:00';
1025      } elsif($attr_types->{$_} eq 'ref') {      } elsif($attr_types->{$_} eq 'ref') {
1026        if($attr_options->{$_}->{class}) {        if($attr_options->{$_}->{class}) {
1027          $obj->{$_} = $self->createNode($attr_options->{$_}->{class});          # HACK!!!
1028            # STANDALONE Objects (objects which make sense to instanciat alone) should not created automaticly
1029            # because they maybe exists and should only be SETTED not CREATED!
1030            # TODO: Create a flag at the scheme for that reason!
1031            #   (e.g child_node => 1 for child-nodes only like e.g. UserData)
1032            if($attr_options->{$_}->{class} eq 'NetPerson' || $attr_options->{$_}->{class} eq 'Event') {
1033              #$obj->{$_} = undef();
1034            } else {
1035              $obj->{$_} = $self->createNode($attr_options->{$_}->{class});
1036            }
1037        } else {        } else {
1038          #$obj->{$_} = undef();          #$obj->{$_} = undef();
1039        }        }

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.45

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