Jump to content
Sign in to follow this  
Jason Stratford

many to many with unique constraint

Recommended Posts

Hello

How do you setup a many to many relationship with a unique constraint across the two id's?

eg

Link table contains fields id1 and id2

I need fields id1 and id2 to form a unique composite key.

I can not seem to find a way to do this...

can anyone help?

Thanks

Jason

Share this post


Link to post
Share on other sites

Maybe make id3 and do a calc of id1 & id2?

Share this post


Link to post
Share on other sites

Maybe, but the relation seems to simulate a permutatet plucking, which stricktly speaking isn't what a many2many is about, since it never can be a selection of records related ...when only one matches another two tables away????

--sd

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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