Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Three way relationship
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Beldar  
View profile  
 More options Apr 2 2012, 6:52 am
From: Beldar <beldar....@gmail.com>
Date: Mon, 2 Apr 2012 03:52:16 -0700 (PDT)
Local: Mon, Apr 2 2012 6:52 am
Subject: Three way relationship

Hi again,

Quick question is it possible to make a 3 way relation (like a n:n but with
3 entities with a single join table) without making the relation table a
full Entity?

Example:
We have 3 Entities, Transportation, Trip, and User and we need to relate
those 3 things, so we have a middle table called Trans_Trip_User with 3
primary foreign keys involving the 3 entities.

How would you approach this problem using Doctrine 2.2?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Rolston  
View profile  
 More options Apr 2 2012, 8:07 pm
From: David Rolston <gizm...@gmail.com>
Date: Mon, 2 Apr 2012 17:07:48 -0700
Local: Mon, Apr 2 2012 8:07 pm
Subject: Re: [doctrine-dev] Three way relationship

I wouldn't.  I would give Trans_Trip_User table its own primary key, and
set the other tables up as standard foreign key relationships.  In general
any multi-column key is a problem for Doctrine v1 and v2.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marco Pivetta  
View profile  
 More options Apr 2 2012, 8:24 pm
From: Marco Pivetta <ocram...@gmail.com>
Date: Tue, 3 Apr 2012 02:24:24 +0200
Local: Mon, Apr 2 2012 8:24 pm
Subject: Re: [doctrine-dev] Three way relationship

Indeed. You can still use an unique key for these 3 join columns, but a
simple identifier is much easier to handle :)
Marco Pivetta

http://twitter.com/Ocramius

http://marco-pivetta.com

On 3 April 2012 02:07, David Rolston <gizm...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »