DataMapper and Codeigniter - how to fully manage a many-to-many relationship
Posted
by user252160
on Stack Overflow
See other posts from Stack Overflow
or by user252160
Published on 2010-02-18T09:48:18Z
Indexed on
2010/03/28
2:53 UTC
Read the original article
Hit count: 727
I have the following relationship
CType has many Field Field has many Ctype
and of course the tables used are fields, ctypes, and ctypes_fields. Normally, the ctypes_fields table should contain only ids referencing the other two tables. However, i'd like to put there a "options" field that will contain some content for the concrete instance only. I walked through all DataMapper tuts but I could'n find relevant info on how I could extract these specific values (the ones in the relation table)
Should I create a separate model for this relation table or there is a clever way to do this ?
© Stack Overflow or respective owner