Jump to content

Many to many self-relationship Redux


Brad Mathews
 Share

This topic is 2284 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am having a very similar problem to this post:

I have three tables in a standard many-many relation ship, Parents and Students and Parents_Students. I want a portal on the Parents layout that will show the other Parents related via the Students table. One way would be to put a Spouse field in the Parents table for a more traditional self relationship, but I might have more than 2 "Parents" the others being grandparents, aunts and the like. Hence the many-many self-relationship.

The answer in the post above refers to a broken link (probably from the earlier version of the forum software) and I cannot find the new link for new post.

Could someone refer me to the new post link or answer the question?

Thanks a bunch!

Brad

 

Edited by Brad Mathews
Typo
Link to comment
Share on other sites

3 hours ago, Brad Mathews said:

I have three tables in a standard many-many relation ship, Parents and Students and Parents_Students.

I don't think the other post is relevant to your situation.

 

3 hours ago, Brad Mathews said:

I want a portal on the Parents layout that will show the other Parents related via the Students table.

One way to do this is to define a self-join of the Parents_Students table as:

Parents_Students::StudentID = Parents_Students 2::StudentID
AND
Parents_Students::ParentID ≠ Parents_Students 2::ParentID

Then add a new occurrence of Parents and relate it to Parents_Students 2 as:

Parents_Students 2::ParentID = Parents 2::ParentID

Place a portal to Parents 2 on a layout of Parents.

.

Link to comment
Share on other sites

This topic is 2284 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.