doc/book/en/development/datamodel/inheritance.rst
branchstable
changeset 4556 43c14e0e8972
parent 4555 8968c50818db
parent 4553 23201259ffeb
child 4560 23e0632df615
equal deleted inserted replaced
4555:8968c50818db 4556:43c14e0e8972
     1 
       
     2 Inheritance
       
     3 -----------
       
     4 
       
     5 When describing a data model, entities can inherit from other entities as is
       
     6 common in object-oriented programming.
       
     7 
       
     8 You have the possibility to adapt some entity attributes, as follow:
       
     9 
       
    10 .. sourcecode:: python
       
    11 
       
    12     from cubes.OTHER_CUBE import entities
       
    13     class EntityExample(entities.EntityExample):
       
    14         def dc_long_title(self):
       
    15             return '%s (%s)' % (self.name, self.description)
       
    16 
       
    17 
       
    18 XXX WRITME