The EntityManager dependency here is only in order to build a default hydration query. This dependency can be removed completely by requiring the user to provide a hydration query.