0

I am working on a custom module named "Amendments". I successfully write CRUD code of both "Categories" and "Amendments" models. I just can't figure out "How to establish a link between both entities". enter image description here

What I'm trying to achieve is,

  1. How to store values in table "tnc_amendments_category_amendment"?
  2. Where can I specify association (in "AbstractModel", "AbstractDb" or in "AbstractCollection")?
  3. When I load any Category from the database, Category Object has an array of associated amendments and vice versa amendments has associated categories. something like given below image

enter image description here

I can't find any information related to Relationship on official documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.