开发者

DataMapper and Codeigniter - how to fully manage a many-to-many relationship

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 referenci开发者_运维技巧ng 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 couldn't 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?


Datamapper OverZealous Edition (DMZ) allows you to do this. It should be compatible with your existing Datamapper application. http://codeigniter.com/forums/viewthread/149388/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜