Displaying 1 result from an estimated 1 matches for "froz".
Did you mean:
from
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
foo_id\
bar_id > primary key/unique
baz_id/
value
foos_bars_bazs_frozs - 4 way join
froz_id\
foo_id \
bar_id \ primary key/unique
baz_id /
value
Now, my use cases for access are:
1. Given a foo, fin...