Now that we have understood the concept of a Many to Many relationship and how we can create that intense
force.
Let's take a quick look at some of the plaintiffs of the various considerations that we need to note
while creating and using Many to Many relationship in many to many relationship.
We create a two monster retail relationships the first master retail relationship that we create forms
the primary relationship and the second one forms the secondary relationship.
And when it matters is that those junction object relies on the primary relationship to inherit some
of the details.
Say for example you can feed the junction objects a detail on the aged pages.
They use the color and some related icons of the primary master object and maybe record ownership.
We know that a master detailed relationship the detailed record ask that you do not have any owner it
relies on the master record for inheriting the owner details right.
But here for junction objects we have to master detailed relationships and we have two masters basically.
So the primary relationship master object that determines the owner of the child a cart.
So the junction object records it inherits the value of the owner field from their associated primary
must have the cart at the same time.
We should also note that for some instance among the two relationships master detail that we have say
we delete the primary relationship.
In that case what happens is the secondary relationship becomes the primary relationship so this is
about the primary and the secondary relationship aspect of the master detailed relationship in many
to many.
Moving on junction object records are deleted when either associated master record is deleted.
Yes so if we know that in a master detailed relationship whenever a parent report is deleted the child
records is also deleted.
But in this scenario we have two master records.
All right.
So for deletion if even one off the master record is deleted then these junction object records are
also deleted.
Perfect.
Moving on.
Roll up somebody feels can be created on both master objects.
Yes make sense formula feels and validation rules on the junction object can reference feeds from both
master objects.
This also perfectly makes sense.
So both my set objects access perfect master objects and you can create all up somebody fields formula
field and validation rules without any restrictions.
A junction object can be on the master side of another master detailed relationship.
Yes so this is to be noted still when there is a junction object which axis jump child object for two
master digital relationships.
In that case the same junction object cannot be on the master side off on the master data relationship.
So that is a restriction and we have to make note of it.
So these are some of the considerations for us while creating and using many to many relationship and
since force.