Continued with Doctrine2 in a database with REPLACE INTO instead of INSERT INTO

I have a table that stores relationships between two other tables with a float, indicating relevance between the two rows. I have a unique key in two reference columns. The problem is that I have to rebuild it regularly, which is quite a long time. That way, I cannot just trim the table while I do this, but I cannot insert a value for the same row while they will duplicate. So I thought it would be great to keep the current timestamp of the variable, keeping the relationship with REPLACE INTO instead of INSERT INTO, and then delete everything that was created before the saved timestamp. However, I could not figure out how to do this. Any ideas? I am using Doctrine 2.2.0-DEV and Symfony 2.1.0-DEV.

+2
source share
1 answer

Doctrine 2 does not support INSERT REPLACEor UPSERT, sorry.

+3
source

All Articles