'Be as useful as possible.  Show the primary key, and an identifier
if we\'ve got one.'

def __unicode__(self):

    typename = u'.'.join((__name__, type(self).__name__))
    pk_constraint = self.__table__.primary_key
    if (not pk_constraint):
        return (u'<%s    object    at    %x>' % (typename, id(self)))
    pk = u',    '.join((six.text_type(getattr(self, column.name)) for column in pk_constraint.columns))
    try:
        return (u'<%s    object    (%s):    %s>' % (typename, pk, self.identifier))
    except AttributeError:
        return (u'<%s    object    (%s)>' % (typename, pk))
