[Jifty-commit] jifty-dbi branch, master, updated. 0.64-7-g8671029

Jifty commits jifty-commit at lists.jifty.org
Tue Jan 25 12:41:40 EST 2011


The branch, master has been updated
       via  8671029e73ff61565fcf7372be010520cdcf32dd (commit)
      from  0e93d3427d77c71392a2e8f131b26a30cd2e474d (commit)

Summary of changes:
 lib/Jifty/DBI/Collection.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 8671029e73ff61565fcf7372be010520cdcf32dd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jan 25 02:34:42 2011 -0500

    Don't encode fields when attempting to limit with IS
    
    Otherwise it becomes inpossible to search for a DateTime column which
    IS NULL, as the filter translates the NULL into an undef, which is
    entered into the query as "WHERE (main.fieldname IS)"

diff --git a/lib/Jifty/DBI/Collection.pm b/lib/Jifty/DBI/Collection.pm
index 519699c..2f9df85 100755
--- a/lib/Jifty/DBI/Collection.pm
+++ b/lib/Jifty/DBI/Collection.pm
@@ -1269,7 +1269,7 @@ sub limit {
     $self->new_item->_apply_input_filters(
         column    => $column_obj,
         value_ref => \$args{'value'},
-    ) if $column_obj && $column_obj->encode_on_select;
+    ) if $column_obj && $column_obj->encode_on_select && $args{operator} !~ /IS/;
 
     # make passing in an object DTRT
     my $value_ref = ref( $args{value} );

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list