I'm fairly new to domain driven design and I've been scratching my head for a while over this issue.
Here are my domain rules
- A Record entity has a document of key value pairs
- We can update the document for a record by providing the updated key value pairs
- When we update a document we must calculate some values according to some parsed expressions.