@_generative()
def with_entities(self, *entities):
    "Return a new :class:`.Query` replacing the SELECT list with the\n        given entities.\n\n        e.g.::\n\n            # Users, filtered on some arbitrary criterion\n            # and then ordered by related email address\n            q = session.query(User).\\\n                        join(User.address).\\\n                        filter(User.name.like('%ed%')).\\\n                        order_by(Address.email)\n\n            # given *only* User.id==5, Address.email, and 'q', what\n            # would the *next* User in the result be ?\n            subq = q.with_entities(Address.email).\\\n                        order_by(None).\\\n                        filter(User.id==5).\\\n                        subquery()\n            q = q.join((subq, subq.c.email < Address.email)).\\\n                        limit(1)\n\n        .. versionadded:: 0.6.5\n\n        "
    self._set_entities(entities)
Return a new :class:`.Query` replacing the SELECT list with the
given entities.

e.g.::

    # Users, filtered on some arbitrary criterion
    # and then ordered by related email address
    q = session.query(User).\
                join(User.address).\
                filter(User.name.like('%ed%')).\
                order_by(Address.email)

    # given *only* User.id==5, Address.email, and 'q', what
    # would the *next* User in the result be ?
    subq = q.with_entities(Address.email).\
                order_by(None).\
                filter(User.id==5).\
                subquery()
    q = q.join((subq, subq.c.email < Address.email)).\
                limit(1)

.. versionadded:: 0.6.5
@_generative()
def with_entities(self, *entities):
    "Return a new :class:`.Query` replacing the SELECT list with the\n        given entities.\n\n        e.g.::\n\n            # Users, filtered on some arbitrary criterion\n            # and then ordered by related email address\n            q = session.query(User).\\\n                        join(User.address).\\\n                        filter(User.name.like('%ed%')).\\\n                        order_by(Address.email)\n\n            # given *only* User.id==5, Address.email, and 'q', what\n            # would the *next* User in the result be ?\n            subq = q.with_entities(Address.email).\\\n                        order_by(None).\\\n                        filter(User.id==5).\\\n                        subquery()\n            q = q.join((subq, subq.c.email < Address.email)).\\\n                        limit(1)\n\n        .. versionadded:: 0.6.5\n\n        "
    self._set_entities(entities)