Hi,

The Jifty::Manual::Models document contains the following snippet:

   # combining restrictions with "AND"
   # note that "AND" is implicit here
   $collection->limit(column=>'col1', value=>'...');
   $collection->limit(column=>'col2', value=>'...');

While testing my Qooqle app in Jifty, however, I found "OR" is
implicit here instead. By further examining the source of
Jifty::DBI::Collection, I've seen the following lines:

sub limit {
   my $self = shift;
   my %args = (
       table            => $self->table,
       column           => undef,
       value            => undef,
       alias            => undef,
       quote_value      => 1,
       entry_aggregator => 'or',
       case_sensitive   => undef,
       operator         => '=',
       subclause        => undef,
       leftjoin         => undef,
       @_    # get the real argumentlist
   );
   ....

Apparently entry_aggregator defaults to "OR" according to the implementation.

Then which one is incorrect? The implementation or the documentation?

Thanks,
Agent
_______________________________________________
jifty-devel mailing list
[email protected]
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel

Reply via email to