I want to accomplish this (mysql) query:
UPDATE table SET field = field + 1 WHERE id = 1
What is the correct way of doing the above using a Doctrine 2 entity?
*Edit
I’m looking for a way to do $entity->incrementField(), which execute the above mysql query on flush()
I can’t seem to find a way to do this using the entity itself. I have solved this now by utilizing a regular DQL which does increment, and update model/entity with result.