--- nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2004/05/06 12:54:34 1.46 +++ nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2004/10/28 11:35:51 1.48 @@ -1,8 +1,14 @@ ############################################ # -# $Id: Tangram.pm,v 1.46 2004/05/06 12:54:34 jonen Exp $ +# $Id: Tangram.pm,v 1.48 2004/10/28 11:35:51 jonen Exp $ # # $Log: Tangram.pm,v $ +# Revision 1.48 2004/10/28 11:35:51 jonen +# + bugfix related to select-criterias(filter) +# +# 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' # @@ -721,13 +727,20 @@ } elsif (my $guid = $query->{options}->{GUID}) { $type = 'TRANSPARENT'; - $query->{criterias} = [ { key => 'guid', op => 'eq', val => $guid } ]; - + if(ref($query->{criterias}) eq 'ARRAY') { + push @{$query->{criterias}}, { key => 'guid', op => 'eq', val => $guid }; + } else { + $query->{criterias} = [ { key => 'guid', op => 'eq', val => $guid } ]; + } + } # if operator is different (dispatcher for 'getListFiltered') - } elsif (my $op = $query->{options}->{op}) { + if (my $op = $query->{options}->{op}) { $type = 'TRANSPARENT'; - $query->{criterias} = [ { key => $query->{options}->{meta_label}, op => $op, val => $query->{options}->{meta_value} } ]; - + if(ref($query->{criterias}) eq 'ARRAY') { + push @{$query->{criterias}}, { key => $query->{options}->{meta_label}, op => $op, val => $query->{options}->{meta_value} }; + } else { + $query->{criterias} = [ { key => $query->{options}->{meta_label}, op => $op, val => $query->{options}->{meta_value} } ]; + } } # HACK: special case: querying by id does not translate into a common tangram query @@ -1036,7 +1049,7 @@ # 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') { + 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});