Rewrite w doctrine