custom build of doctrine orm 2