Add doctrine merging