Closed jasmarc closed 11 years ago
What i see in the query is that there is just a single parameter passed and no value is present for the limit. Are you able to reproduce this issue with the latest version without using DataMapper?
This isn't a problem with DO. If you look at the query generated you see there are two bind parameters in the query: LIKE ? and LIMIT ?. There seems to be only one variable bound, %Knuth%. In that case I can expect there being a problem.
Please check with in this case datamapper to see why the wrong query is being generated. @dkubb does this look like something you've seen before?
My entities are defined as such.
I issue a query like this:
And I get this error, which I've traced down to this line. I really don't understand it all. I've tried commenting out some of the surrounding code, thinking that the error was actually occurring on the line above line 12. I've added logging to the
quote_string
method that's being called on line 12 -- the problem's not there, as it doesn't even make it that far. So, something is going on in thecase
-when
statement.UPDATE: The problem is still on line 12 of
quoting.rb
, however I've noticed that something weird is going on with the call toquote_string
. I made an exact copy of this method calledmyquotestring
and replaced the call toquote_string
with an equivalent call to my new method and things worked fine. There's obviously some meta-programming magic going on somewhere that I'm not aware of.