def primary_key(cls):
        """Return the name of the table's primary key

        :rtype: string

        """

        if cls.__from_class__:
            cls = cls.__from_class__
        return cls.__table__.primary_key.columns.values()[0].name