I am trying to INSERT OR UPDATE IF EXISTS in one transaction.
in mysql, I would generally use DUPLICATE KEY ("UPDATE ON DUPLICATE KEY".) I'm aware of many solutions to this problem using various sql variants and subqueries, but I'm trying to implement this in Doctrine (php ORM). It seems there would be Doctrine methods for doing this since it's so feature packed, but I'm not finding anything. Is this sort of thing a problem using php ORM packages for some reason? Or do any Doctrine experts know how to achieve this through hacks or any means?