'Call by pickle to dataify the comment
because we DO NOT WANT REF in this pickleisation!'

def __getstate__(self):

    cls = self.__class__
    res = {'id': self.id}
    for prop in cls.properties:
        if hasattr(self, prop):
            res[prop] = getattr(self, prop)
    if (self.command and (not isinstance(self.command, basestring))):
        res['command'] = self.command.get_name()
    elif (self.command and isinstance(self.command, basestring)):
        res['command'] = self.command
    else:
        res['command'] = ''
    return res
