Jump to content

constructLoadQuery and roots()


Go to solution Solved by Daniel F,

Recommended Posts

protected static function constructLoadQuery( $id, $idField, $extraWhereClause )
{
	return parent::constructLoadQuery( $id, $idField, $extraWhereClause )->join( 'nexus_donate_addon_goals', 'nexus_donate_addon_goals.d_did=nexus_donate_goals.d_id' );
}
\IPS\nexus\Donation\Goal::roots()

Can someone tell me if roots method works with or uses constructLoadQuery?

When I use \IPS\nexus\Donation\Goal::roots(), the joined fields are not included. Is there something else required to get this to work?

Link to comment
Share on other sites

  • Solution

Take a look at Node::roots() ūüėČ

Unfortunatly there are few cases where nodes are handled different and this is one...
Node::roots() won't call the constructLoadQuery method, but you'll be able to add your own data to the AR object inside the constructFromData() method.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
√ó
√ó
  • Create New...