Inheritance of entities like objects?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hi-ko
    Senior Member
    • May 2015
    • 100

    #1

    Inheritance of entities like objects?

    There is no way to inherit entity definitions, as is possible with object inheritance, is there? I would like to implement contracts that differ greatly by type in their properties and behavior depending on the contract type (e.g., purchase contract, service contract, usage rights) but share a common set on fields to be searched, listed, linked in workflow rules, emails, ...

    The only options I can think of are
    1. one single entity has the sum of all fields, which are shown or hidden depending on the type
    2. The data of the “superclass” is managed in a entity, while the data of the “inheriting” classes is managed in separate entities that have a parent/child relationship.
    3. No "inheritance". Several entity types have all required fields on their own entity. Worflow rules / after save triggers will update an abstract entity to be searched on and linked to.
    Does anyone have a better idea? Maybe someone has already examples how to implement something like a superclass / inherited entity type?
  • a.slyzhko
    Senior Member
    • Oct 2023
    • 114

    #2
    You can use additional builder to dynamically add metadata for your needs. Check out documentation and coding example

    Comment

    • hi-ko
      Senior Member
      • May 2015
      • 100

      #3
      Originally posted by a.slyzhko
      You can use additional builder to dynamically add metadata for your needs. Check out documentation and coding example
      Thanks for your feedback. Isn't that the first variant I mentioned with details how to restrict query and access to the fields?
      I'm still not sure which way to go but I guess there is no better way than variant 1 or 3.

      Comment

      Working...