#16 new
chris finne

find a false boolean fails

Reported by chris finne | April 6th, 2010 @ 03:02 AM

This fails:
ReportPageView.find_all_by_is_processed(false)

the "false" value not being appended to the SELECT statement...

Aws::AwsError: InvalidQueryExpression: The specified query expression syntax is not valid...
Action=Select&SelectExpression=SELECT%20%2A%20FROM%20%60development_report_page_views%60%20WHERE%20is_processed%3D&SignatureMethod=

find by a true value works fine.

Comments and changes to this ticket

  • chris finne

    chris finne April 6th, 2010 @ 03:26 AM

    It also fails in the same way with find(:all, :conditions) where conditions is a hash or an array.

    I think I've traced it to this method in the aws gem: right_sdb_interface.rb

    def escape(value)
      %Q{'#{value.to_s.gsub(/(['\\])/){ "\\#{$1}" }}'} if value
    end
    

    the value is false, so nothing is returned.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A drop in replacement for ActiveRecord for Amazon SimpleDB.

Code hosted at http://github.com/appoxy/simple_record

Shared Ticket Bins

People watching this ticket

Pages