"join table" with one-to-many relation


I was wondering if yii could handle one-to-many relations with a join Table in an active record ?

If so, any code examples ?


I don’t think so, but what is a real example of using a join table for one-to-many relationship?

First example would be:

Posts -> post-to-tag -> tags

in nearly every possible imagination where you have a one-to-many relation but where many isn’t associated to one record.

Imagine a roleplaying game.

You got skills and you got monsters … each monster has many skills. But a skill can be associated to more than 1 monster.

so You need an association table between those 2 :)

You describe a many-to-many relationship, and Yii supports it.