nkallen / cache-money

A Write-Through Cacheing Library for ActiveRecord
Apache License 2.0
994 stars 107 forks source link

"wrong number of bind variables (1 for 2) in .... #18

Open atif opened 14 years ago

atif commented 14 years ago

I am facing the above exception. I've defined a composite index that includes a boolean column and it's not working. Does anyone has an idea what's the problem?

jeremy commented 14 years ago

You have a find with :conditions somewhere that needs two bind variables, but you're providing one.

Is this in your app, or is it a cache-money issue?

atif commented 14 years ago

I have find with condition containing and between three columns like :conditions => ["A = ? and B = ? and C = ?", "a", "b", true] I have defined a combined index like index [:A, :B, :C]

I'm getting this exception only in case of boolean column which in current case is C.