'Return the first result of this ``Query`` or
None if the result doesn\'t contain any row.
first() applies a limit of one within the generated SQL, so that
only one primary entity row is generated on the server side
(note this may consist of multiple result rows if join-loaded
collections are present).
Calling ``first()`` results in an execution of the underlying query.'

def first(self):

    if (self._statement is not None):
        ret = list(self)[0:1]
    else:
        ret = list(self[0:1])
    if (len(ret) > 0):
        return ret[0]
    else:
        return None
