I have three tables, Albums(id, name, desc), Categories(id, name, desc), and albums_in_categories(album_id, category_id). Currently with PHP Active Record, here are the two classes:
<?php
class Category extends ActiveRecord\Model {
static $has_many = array(
array("albums")
);
}
and
<?php
class Album extends ActiveRecord\Model {
static $belongs_to = array(
array("categories")
);
}
Now, how would I go about defining the associative table (albums_in_categories) so that my relations are fully setup?