You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my example I have table "Nominal" which is hierarchical. When I load it, I create an array like this:
"id" -> "path"
This is handy for be because now that when I'm reading from another model and it contain "id" value, I can look up full nominal path without worrying about number of selects.
I believe Agile Data can do this for me special join type. Here is how I'd like it to work:
$n = new Model_Nominal($db);
$assoc = $n->getPathAssociations(); // returns "id" -> "path"
// Next create a model
$nar = new Model($assoc));
// Test it
$nar->load(183);
echo $nar[$nar->title_field]; // will output path
$m = new Model_Report_Activity($db);
$m->join($nar, 'nominal_id')->addField('nominal_path');
foreach($m as $row) {
var_dump($row); // includes 'nominal_path' now
}
The text was updated successfully, but these errors were encountered:
In my example I have table "Nominal" which is hierarchical. When I load it, I create an array like this:
This is handy for be because now that when I'm reading from another model and it contain "id" value, I can look up full nominal path without worrying about number of selects.
I believe Agile Data can do this for me special join type. Here is how I'd like it to work:
The text was updated successfully, but these errors were encountered: