This PR adjusts the InitCommand to call flush on the EntityManager after initializing a webspace.
Why?
Because this way it is possible to configure the same role for multiple Webspaces. Otherwise the created role is not flushed and therefore created again during the initialization of the second Webspace. This leads to a Doctrine\DBAL\Exception\UniqueConstraintViolationException.
What's in this PR?
This PR adjusts the
InitCommand
to call flush on theEntityManager
after initializing a webspace.Why?
Because this way it is possible to configure the same role for multiple Webspaces. Otherwise the created role is not flushed and therefore created again during the initialization of the second Webspace. This leads to a
Doctrine\DBAL\Exception\UniqueConstraintViolationException
.