I'm just wondering if it is possible to have multiple many_many relationships on the same class. For example, I have a Table A, Table B and Table C. I want a many_many relationship between Table A and Table B and another many_many relationship between Table A and Table C. I have tried this but it is not adding the IDs to the tables it creates. I did some searching and found this http://www.balbuss.com/multiple-many-many-s-of-the-same-class/ and am not sure whether it is even possible now.
Any help is very much appreciated.
I had a thought about using onAfterWrite to populate the linked table but should I need to do this?
class Table B extends DateObject {
static $belongs_many_many = array (
'TableAs' => 'TableA'
);
}
class Table C extends DateObject {
static $belongs_many_many = array (
'TableAs' => 'TableA'
);
}
class Table A extends Page {
static $many_many = array (
'TableB' => 'TableB',
'TableC' => 'TableC'
);
}