Skip to main content
Modules in Mercur never reference each other directly. They connect through module links. A review carries no foreign keys to its target on the model itself. Instead, four links anchor each review to the rest of the marketplace. Once a link is defined, you retrieve related records with query.graph using the link alias.

Targets

A review is linked to either a product or a seller, never both. The reference field on the review decides which link is created.

Provenance

These two links are written for every review and back the validation that a customer can review a target only once per order.
All four links are list links (isList: true) on the owning side. A product, seller, order, or customer has many reviews.