I have a join/junction table between two others. pretty
straightforward except that the join table has additional fields, one
of which is another foreign key (1-M, actually) to another table.
can I have a link _and_ a relate using that join table?
thanx
barry.b
<object name="Session_option">
<hasMany name="Attendee">
<link name="Attendee_Session" /><!-- to the join table -->
</hasMany>
<hasMany name="Attendee_Session">
<relate from="Attendee_Session_id" to="Attendee_Session_id"
/><!-- to the join table -->
</hasMany>
</object>
<!-- THE JOIN/JUNCTION TABLE -->
<object name="Attendee_Session">
<hasOne name="Session_option">
<relate from="Session_option_id" to="Session_option_id" />
</hasOne>
<hasOne name="Attendee">
<relate from="Attendee_id" to="Attendee_id" />
</hasOne>
</object>
<object name="Attendee">
<hasMany name="Session_option">
<link name="Attendee_Session" /><!-- to the join table -->
</hasMany>
<hasMany name="Attendee_Session">
<relate from="Attendee_Session_id" to="Attendee_Session_id"
/><!-- to the join table -->
</hasMany>
</object>
************************************
[PK: primary key; FK: foreign key; (FK): irrelevant foreign key]
session_option
----------------
PK session_option_id
venue_id
session_start
session_end
(FK) session_id
attendee_session (alternative)
----------------
PK attendee_session_id
FK attendee_id
FK session_option_id
attended
(FK) attendee_session_comment_id
attendee
---------------
PK attendee_id
user_id
attendee_contact
************************************
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --