Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted August 19, 20213 yr 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?
August 27, 20213 yr 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.