An edge represents an association between persisted domain entities. In reactive R2DBC persistence, model that association explicitly because direct entity relationships are not automatically supported. section 13.1.1
Represent an edge by choosing one of these persistence strategies:
- Store identifiers such as Set<Long> values in the owning entity; this preserves uniqueness but may require an array column and cannot always enforce foreign keys. section 13.1.1
- Shape the entities and tables to mirror the relationship, using a column on the referred object to point back to its owner. section 13.1.1
- Serialize related entities as JSON in a large VARCHAR column when querying through the relationship is unnecessary. section 13.1.1
Taco ingredients
A Taco keeps ingredientIds in a HashSet<Long> and adds an ingredient by storing its ID. A TacoOrder similarly keeps taco IDs, separating relationship persistence from the related objects themselves.

















