I'm using Symfony2 and the Doctrine query builder. Is there an easy way to reverse a Boolean in the database?
I've tried this with no luck:
$query->update('AppMonitorBundle:Monitor', 'm')
->set('m.isActive', '!m.isActive')
->where('m.id = :monitor')
->setParameter('monitor', $monitor)
->getQuery()
->execute()
;
Which I believe would work in SQL but it gives me:
[Syntax Error] line 0, col 51: Error: Expected Literal, got '!'
Substituting ! for NOT gives the same result.