Modify DoctrineWriter adding capability to persist entities with relations