I have to use plain postgreSql UPDATE query. It works properly from web side but there is a problem, it doesn't take any effect from php unit test. The query looks like this:
UPDATE tableName SET field1 = field1 + 1 WHERE type = 'myType'
There are already loaded fixtures where type = 'myType', but no update on it.
In case if I call update after inserting the row and try to update it this query works from tests. There is no loaded fixture with type ='someNewType' before running insert.
INSERT INTO tableName (field1, field2, field3)
SELECT 'someNewType', 1, 'xxx'
WHERE NOT EXISTS (SELECT 1 FROM tableName as r WHERE r.type = 'someNewType')
UPDATE tableName SET field1 = field1 + 1 WHERE type = 'someNewType'
In this case update will work from unit test and updates the row.
Any suggestion