'apply the given filtering criterion to a copy
of this :class:`.Query`, using keyword expressions.
e.g.::
session.query(MyClass).filter_by(name = \'some name\')
Multiple criteria are joined together by AND::
session.query(MyClass).\
filter_by(name = \'some name\', id = 5)
The keyword expressions are extracted from the primary
entity of the query, or the last entity that was the
target of a call to :meth:`.Query.join`.
.. seealso::
:meth:`.Query.filter` - filter on SQL expressions.'

def filter_by(self, **kwargs):

    clauses = [(_entity_descriptor(self._joinpoint_zero(), key) == value) for (key, value) in kwargs.items()]
    return self.filter(sql.and_(*clauses))
