Welcome Guest, Not a member yet? Register   Sign In
Datamapper: more direct access to join fields
#3

[eluser]Dracos[/eluser]
Thanks WanWizard.

It would seem to me that modifying include_join_fields() to take $model as an argument (class name string, instance, or an array of these) could solve this (also optionally a second argument for a list of desired join fields). Or introducing a new function the achieve the same end.

Code:
$a = new A($id);
$a->include_join_fields('B', 'foo')->get();

// result: $a now includes the A_B.foo join field


Messages In This Thread
Datamapper: more direct access to join fields - by El Forum - 03-19-2012, 05:19 PM
Datamapper: more direct access to join fields - by El Forum - 03-20-2012, 02:05 AM
Datamapper: more direct access to join fields - by El Forum - 03-20-2012, 09:13 AM
Datamapper: more direct access to join fields - by El Forum - 03-20-2012, 01:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB