I would like to do this request in Doctrine :
IF EXISTS (SELECT * FROM Table1 WHERE Column1='SomeValue')
UPDATE Table1 SET (...) WHERE Column1='SomeValue'
ELSE
INSERT INTO Table1 VALUES (...)
The only way is to do a replace into
from what I read (Doctrine docs) but the problem with REPLACE
seems to be that it drops and then creates a new row (rather than performing an actual UPDATE
)...