I have a situation that I am not sure how to handle. Any comments would be appreciated. This is the situation:
Table1 has a foreign key to Table2 and Table3
Table 2 has a foreign key to Table3
All these foreign keys are put together withrelations using left outer joins.
Table1 will have ever only one of the foreign keys populated, but there will be some rows joined to Table2 and some rows joined to Table3. Table2 will always be joined to Table3. I need to sort a foundset (containing rows with both situations) based on a column in Table3.
I know that for searching, I can do this:
controller.find();
Table1_to_Table2.Table2_to_Table3.ColumnInTable3 = "Some Value’;
controller.newRecord();
Table1_to_Table3.ColumnInTable3 = "Some Value’;
controller.search();
Is there any type of equivalent for controller.sort()? Or, is there some other way to do this?
TIA for any help!