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")`. |
| 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")`. |