entity.py
branchstable
changeset 3626 017869a514c3
parent 3552 8facb3324170
child 3629 559cad62c786
child 3664 af7ca3597b8d
equal deleted inserted replaced
3625:f03b55a18c43 3626:017869a514c3
   154 
   154 
   155     :type skip_copy_for: list
   155     :type skip_copy_for: list
   156     :cvar skip_copy_for: a list of relations that should be skipped when copying
   156     :cvar skip_copy_for: a list of relations that should be skipped when copying
   157                          this kind of entity. Note that some relations such
   157                          this kind of entity. Note that some relations such
   158                          as composite relations or relations that have '?1' as object
   158                          as composite relations or relations that have '?1' as object
   159                          cardinality
   159                          cardinality are always skipped. 
   160     """
   160     """
   161     __metaclass__ = _metaentity
   161     __metaclass__ = _metaentity
   162     __registry__ = 'etypes'
   162     __registry__ = 'etypes'
   163     __select__ = yes()
   163     __select__ = yes()
   164 
   164 
   475         return data
   475         return data
   476 
   476 
   477     # entity cloning ##########################################################
   477     # entity cloning ##########################################################
   478 
   478 
   479     def copy_relations(self, ceid):
   479     def copy_relations(self, ceid):
   480         """copy relations of the object with the given eid on this object
   480         """copy relations of the object with the given eid on this
       
   481         object (this method is called on the newly created copy, and
       
   482         ceid designates the original entity).
   481 
   483 
   482         By default meta and composite relations are skipped.
   484         By default meta and composite relations are skipped.
   483         Overrides this if you want another behaviour
   485         Overrides this if you want another behaviour
   484         """
   486         """
   485         assert self.has_eid()
   487         assert self.has_eid()