[eluser]theprodigy[/eluser]
ok, so to make sure I understand correctly, let's assume I have tables ones, twos, threes (with models one, two, three). I then have join tables of ones_twos, and ones_threes. Let's assume for this example, in ones_twos, I also have three_id (so that the table has id, one_id, two_id, and three_id).
Now, from your first explanation, I need to create a model for ones_twos, defining the relationship between ones_twos, and threes.
So, my model will look like?
Code:
class Ones_twos extends DataMapper {
var $has_one = array();
var $has_many = array('three');
function __construct($id = NULL)
{
parent::__construct($id);
}
}
Will this allow me to access the 'threes' the same way I will the 'twos' and 'ones', or will I need to explicitly call this model in order to get the 'threes'? Having a model like this, (how) does this affect the original relationship between the 'ones' and 'twos'?
Sorry for all the questions, still learning ;-)