0

I am writing an ORM. I am curious how friend relations are generally modeled. Are they duplicated relations in a link table with each user an owner of his friend relations, or is there an introduction of a mutually owned relation, where the orm looks up relation links where the relation owner's id can be in the child field of the relation link table?

MetaChrome
  • 3,210
  • 6
  • 31
  • 48

1 Answers1

1

I've never seen an ORM doing your "mutually owned relation" because it would only work for readonly scenarios but ORM is typically for readwrite. i would model them like this

Community
  • 1
  • 1
Firo
  • 30,626
  • 4
  • 55
  • 94