Changes between Version 1 and Version 2 of MappingDecorator


Ignore:
Timestamp:
2011-02-14T10:14:05+01:00 (14 years ago)
Author:
jvelde
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MappingDecorator

    v1 v2  
    1616
    1717== Inheritance ==
    18 Decorators follow entity enheritance, which means: say you have an entity A having a decorator, and entity B extends A. You perform a db action on B, now the decorator from entity A is used. Inside the decorator, you can distinguish types (A or B) by using `entity.get__Type()`. You can get properties from B inside the decorator with the same functions as you would from A (e.g. `B.getName()`), any B specific fields can be obtained with `B.get("fieldname")`.
     18Decorators follow entity enheritance, which means: say you have an entity A having a decorator, and entity B extends A. You perform a db action on B, now the decorator from entity A is used. Inside the decorator, you can distinguish types (A or B ) by using `entity.get__Type()`. You can get properties from B inside the decorator with the same functions as you would from A (e.g. `B.getName()`), any B specific fields can be obtained with `B.get("fieldname")`.