use doctrine common to support more doctrine implementations + lazy load repository + flush fixes