I have three models group, material and layer. Model layer has hasOne link to the model material. Model material has hasOne link to the model group. On the input page for layer I would like to show only the materials of group that the user has previously selected. I’ve tried something like this:
$l = $this->add('Model_Layer'); $l_material = $ms -> refSQL('Material'); $l_material -> addCondition('group_id',$_GET['group_id']);
However it seems that something like this only works when there is hasMany connection between models. How could this be solved?
Thank you in advance