entity.py
changeset 3629 559cad62c786
parent 3589 a5432f99f2d9
parent 3626 017869a514c3
child 3649 59eb710b9862
equal deleted inserted replaced
3590:1b0dbcf4b214 3629:559cad62c786
    59 
    59 
    60     :type skip_copy_for: list
    60     :type skip_copy_for: list
    61     :cvar skip_copy_for: a list of relations that should be skipped when copying
    61     :cvar skip_copy_for: a list of relations that should be skipped when copying
    62                          this kind of entity. Note that some relations such
    62                          this kind of entity. Note that some relations such
    63                          as composite relations or relations that have '?1' as object
    63                          as composite relations or relations that have '?1' as object
    64                          cardinality
    64                          cardinality are always skipped. 
    65     """
    65     """
    66     __registry__ = 'etypes'
    66     __registry__ = 'etypes'
    67     __select__ = yes()
    67     __select__ = yes()
    68 
    68 
    69     # class attributes that must be set in class definition
    69     # class attributes that must be set in class definition
   371         return data
   371         return data
   372 
   372 
   373     # entity cloning ##########################################################
   373     # entity cloning ##########################################################
   374 
   374 
   375     def copy_relations(self, ceid):
   375     def copy_relations(self, ceid):
   376         """copy relations of the object with the given eid on this object
   376         """copy relations of the object with the given eid on this
       
   377         object (this method is called on the newly created copy, and
       
   378         ceid designates the original entity).
   377 
   379 
   378         By default meta and composite relations are skipped.
   380         By default meta and composite relations are skipped.
   379         Overrides this if you want another behaviour
   381         Overrides this if you want another behaviour
   380         """
   382         """
   381         assert self.has_eid()
   383         assert self.has_eid()