Backported 2.0 refactor to Doctrine 2
Backport object selectors from 2.0