Reputation: 1529
In my Symfony 2 application I have the following scenario, in this order:
Is there a way to do this in Doctrine, e.g. managing multiple unit of work at the same time or something similar? Otherwise I was looking at this http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#update-queries, i.e. single queries for each update made in point (2) and this http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/query-builder.html#sql-query-builder for insertions made in point (2) but I was wondering if there is a better approach.
Upvotes: 0
Views: 2842
Reputation: 357
You can split your "system" entities and "program" entities and use 2 connections. Have a look here
Upvotes: 1
Reputation: 4345
You can detach entities that you don't want to be flushed and call $em->flush();
$em->detach($entity);
Upvotes: 1