PopulatedDoc
Describes how to deal with a cosmos db field type of PopulatedDoc
Cosmos DB Model
Domain Props
Every PopulatedDoc field needs the read-only field with props type and a setRef field which is a method that takes in an entity reference of the domain object referenced in previous field
The argument of setRef method should be the same as the name of the field above it
Domain Entity Reference
Note: must include field name and setRef method name in the omit union of strings
Domain Class
Getter
Setter
setRef method comes from field defined in Domain Props
Note: setRef method takes in entity reference of domain object as an argument
Domain Adapter
Getter
Setter
Needs a setter for the setRef method created in domain props
takes in entity reference of domain object being stored in that field
Note: use exactly the notation below for setting the doc: first argument is the field name as a string and the second is the argument being passed in to the function with square bracket notation accessing the doc of that domain object
Last updated