Displaying 4 results from an estimated 4 matches for "people_projects_rol".
Did you mean:
people_projects_roles
2006 Jan 04
0
Re: DB Modelling the Rails way - solution by Chris Hall
...W, forgive me if this is a duplicate post - I had some mailing
problems yesterday.
Kind Regards,
Eric.
Chris Hall wrote:
> I might suggest the following (and I am making the asusmption that the
> relationships between projects, people and roles is unlimited
>
> (untested)
>
> people_projects_roles (join table between people and projects and roles)
> ----------
> person_id
> role_id
> project_id
>
> class Project < ActiveRecord::Base
> has_and_belongs_to_many :people, :join_table => "people_projects_roles"
> has_and_belongs_to_many :roles, :join_...
2006 Jan 02
5
DB Modelling the Rails way - Opinions??
Hi,
I''m trying to figure the most efficient way to model the following. I
can think of at least two ways to relate the tables but from a
client/server perspective! I''m wondering how to best (and
elegantly)relate them from an AR perspective.
A project has many people,
A person can work on many projects at any time,
A project has many roles,
A role is performed by a person,
A
2006 Jan 07
4
To Chris Hall - Re: DB Modelling the Rails way - Opinions??
...anisations are doing what within any number of
> projects - that sorta thing.
>
> Whatya think?
> Eric.
>
TO which Chris replied;
I might suggest the following (and I am making the asusmption that the
relationships between projects, people and roles is unlimited
(untested)
people_projects_roles (join table between people and projects and roles)
----------
person_id
role_id
project_id
class Project < ActiveRecord::Base
has_and_belongs_to_many :people, :join_table => "people_projects_roles"
has_and_belongs_to_many :roles, :join_table => "people_projects_role...
2006 Jan 21
7
n-way joins
Hi,
I''m somewhat of a Rails newbie and am trying to understand how to
formulate n-way (3 or 4 way) joins in Rails (where the join tables
contain extra data as well.)
Let me give you my basic entities:
foos
id - pk
name - unique
bars
id - pk
name - unique
bazs
id - pk
name - unique
frozs
id - pk
name - unique
then i have two separate join tables:
foos_bars_bazs - 3 way join