--- nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2003/12/04 01:01:50 1.44 +++ nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2004/08/31 14:26:08 1.47 @@ -1,8 +1,18 @@ ############################################ # -# $Id: Tangram.pm,v 1.44 2003/12/04 01:01:50 joko Exp $ +# $Id: Tangram.pm,v 1.47 2004/08/31 14:26:08 jonen Exp $ # # $Log: Tangram.pm,v $ +# Revision 1.47 2004/08/31 14:26:08 jonen +# updated +# +# Revision 1.46 2004/05/06 12:54:34 jonen +# + bugfix related to multiple select-'filter' +# +# Revision 1.45 2003/12/14 01:48:36 jonen +# small HACK at _insertChildNode: some special Childnodes should not be created because existing objects have to be selected! +# TODO: make this more generic, e.g. implement a special flag at Schema +# # Revision 1.44 2003/12/04 01:01:50 joko # + sendQuery now returns result even on crud=UPDATE # @@ -525,7 +535,7 @@ my @results; $logger->debug( __PACKAGE__ . "->getListFiltered( nodename => '" . $in->{nodename} . "' )" ); - #print Dumper($filters); + #print "Filter_payload: " . Dumper($in->{filters}) . "\n"; # 1. "Remote Object Handle" - get set of objects from odbms by object name my $remote = $self->{_COREHANDLE}->remote($in->{nodename}); @@ -581,7 +591,7 @@ $orm_filter_tmp = $left->$op($right); } - if (not $orm_filter) { + if (!ref($orm_filter)) { $orm_filter = $orm_filter_tmp; } else { $orm_filter = $orm_filter->and($orm_filter_tmp); @@ -590,6 +600,9 @@ } $orm_query->{filter} = $orm_filter; + + # debug point: + #print "Filter: " . Dumper($orm_query->{filter}) . "\n"; # was: @@ -831,6 +844,7 @@ my $object = $cursor->getNextEntry(); $self->erase($object); + $self->unload($object); } elsif ($crud eq 'CREATE') { @@ -1020,7 +1034,16 @@ $obj->{$_} = '0000-00-00 00:00:00'; } elsif($attr_types->{$_} eq 'ref') { if($attr_options->{$_}->{class}) { - $obj->{$_} = $self->createNode($attr_options->{$_}->{class}); + # HACK!!! + # STANDALONE Objects (objects which make sense to instanciat alone) should not created automaticly + # because they maybe exists and should only be SETTED not CREATED! + # TODO: Create a flag at the scheme for that reason! + # (e.g child_node => 1 for child-nodes only like e.g. UserData) + if($attr_options->{$_}->{class} eq 'NetPerson' || $attr_options->{$_}->{class} eq 'Event' || $attr_options->{$_}->{class} eq 'BetRule') { + #$obj->{$_} = undef(); + } else { + $obj->{$_} = $self->createNode($attr_options->{$_}->{class}); + } } else { #$obj->{$_} = undef(); }