SELECT ... FROM (...) AS `t0` LEFT JOIN `em_questions` AS `t1` ON (`t0`.`id` = `t1`.`indicator_id`) LEFT JOIN `em_question_answers` AS `t3` ON (`t1`.`id` = `t3`.`question_id`) WHERE `t3`.`is_active` = 'YES
The problem is that this query leaves out all the questions that doesn't have answer options, I need the code to produce something like:
SELECT ... FROM (...) AS `t0` LEFT JOIN `em_questions` AS `t1` ON (`t0`.`id` = `t1`.`indicator_id`) LEFT JOIN `em_question_answers` AS `t3` ON (`t1`.`id` = `t3`.`question_id` AND `t3`.`is_active` = 'YES')
I tried placing the condition as a model property ($_conditions) but when I do the relation fuel just ignores the where clause.
Ignoring conditions should be something that is fixed in the current release version, so if you're not on 1.6.1, I suggest you upgrade.
As to your other question, I don't think you can currently add additional join clauses using chaining, please make a feature request for this at https://github.com/fuel/orm/issues, stating your use case.