Working with shared entity data

PolicyCenter does not permit an entity instance to exist in more than one instance of the archive domain graph. Existence in more that one instance of the archive domain graph violates the boundary of a unit of work. However, there are cases in which you might want to share entity instance data across multiple policies and their individual instances of the archive domain graph.

For example, you cannot have two separate policy period instances that own the same Note instance. If you want to share an entity, such as a Note, across multiple policy periods, extend the PolicyPeriod entity type and add a foreign key to the shared entity table.

If you share an entity type across multiple policy periods, there are several considerations of which you need to be aware:

  • You cannot create a foreign key from that shared entity to any entity in the archive domain graph.
  • Any code that you construct around the shared entity must take archiving into account. For example, the code must handle the possibility that not all related policy periods the code references necessarily exist in the main application database.