sql - Why does Perl's DBIx::Class $resultset->update fail on complex search queries? -


I have a Pearl search that looks like this:

  My $ rs = Shift- & gt; Search ({-and = & gt; [{'for_revocation' = & gt; 1}, [{status = & gt; {'no_in' => ['abort', 'abort']}}, {status = & Gt; Canceled, update = & gt; {'& lt;' = & gt; \ 'Now () - Interval 1 hour'}},]]});  

And then I do ..

  $ rs-> Update ({status = & gt; 'Revoke'});  

but I get an error ...

DBI Exception: DBD :: mysql :: st Execution Failed: There is an error in your SQL syntax; To use the statement '1' near '' REVOCATION '' for the correct syntax, check the manual related to your MySQL server edition [for the statement "update wmv_attempt SET status =? WHERE (RERE (0xadf93a8 ) For REVOCATION?) With "ParamValues: 0 = 'cancel', 1 = 1] (eval 20 9 38) line 1

If I enter $ rs- > Gt; It looks like using the as_query () to search the SQL: It looks like:

  SELECT .... from wmv_attempt me (where (not the situation (? ,?) Or (status =? And updated & lt 

it seems that when it updates ()

I suspect that this is a bug .

Does anyone suggest that I may be wrong or an alternative approach?

Thanks, Tom


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -