You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attribute names are dynamically generated for Value Objects enclosed in Aggregates or Entities. The generated name string set combines the Value Object's name in Aggregate/Entity and the attribute names defined in Value Object.
They can be overridden with the referenced_as parameter for each field in the Value Object.
@domain.value_object
class Money:
currency = String(max_length=3)
amount = Float(referenced_as="amt")
It may be beneficial to allow redefinition of the name in the enclosing container than the value object. Each enclosing container can define its custom attribute name set, thus increasing the reusability of the Value Object.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Attribute names are dynamically generated for Value Objects enclosed in Aggregates or Entities. The generated name string set combines the Value Object's name in Aggregate/Entity and the attribute names defined in Value Object.
They can be overridden with the
referenced_as
parameter for each field in the Value Object.It may be beneficial to allow redefinition of the name in the enclosing container than the value object. Each enclosing container can define its custom attribute name set, thus increasing the reusability of the Value Object.
Beta Was this translation helpful? Give feedback.
All reactions