[eluser]hidechron[/eluser]
Hi codeigniter forums o/
I'm working on some relations, and i can't figure how can i do a relation within a relation. Maybe that's just wrong but it's the best way I found.
Here a schema to illustrate what i'm trying to do (used cakeapp.com, nice to vizualise db)
I'm simply trying to make the DMZ model of "games_users".
Basically it says "Users have this game in that category".
So I've done the obvious part:
Code:
class User extends datamapper
{
var $has_many = array('game', 'category', 'tags');
...
Code:
class Game extends Datamapper
{
var $has_one = array('developer');
var $has_many = array('user', 'tags', 'category');
...
(I removed the non relevant relations nor in the screen for clarity.)
And I browsed the really good DMZ documentation but i can't figure at all if I can do something like this or even another way.