@classmethod
def pk_attribute(cls):
    """Get object primary key attribute.

        :return: sqlalchemy ``Column`` object of the primary key
        """
    if cls.__mapper__.primary_key:
        return getattr(cls, cls.pk_name())
