(self)
return relationship(self.Comment)
Generates the comment tables and adds the attribute to the parent model
        object.

        Returns:
            A relationship to a comment (timesketch.models.annotation.Comment)
Generates the comment tables and adds the attribute to the parent model
        object.
Generates the comment tables and adds the attribute to the parent model object .
def comments(self):
        """
        Generates the comment tables and adds the attribute to the parent model
        object.

        Returns:
            A relationship to a comment (timesketch.models.annotation.Comment)
        """
        if six.PY2:
            class_name = b'{0:s}Comment'.format(self.__name__)
        else:
            class_name = '{0:s}Comment'.format(self.__name__)

        self.Comment = type(
            class_name, (
                Comment,
                BaseModel, ),
            dict(
                __tablename__='{0:s}_comment'.format(self.__tablename__),
                parent_id=Column(
                    Integer,
                    ForeignKey('{0:s}.id'.format(self.__tablename__))),
                parent=relationship(self), ))
        return relationship(self.Comment)
def comments ( self ) : if six . PY2 : class_name = b'{0:s}Comment' . format ( self . __name__ ) else : class_name = '{0:s}Comment' . format ( self . __name__ ) self . Comment = type ( class_name , ( Comment , BaseModel , ) , dict ( __tablename__ = '{0:s}_comment' . format ( self . __tablename__ ) , parent_id = Column ( Integer , ForeignKey ( '{0:s}.id' . format ( self . __tablename__ ) ) ) , parent = relationship ( self ) , ) ) return relationship ( self . Comment )