AnsweredAssumed Answered

Override SugarQuery.php method in an upgrade safe manner

Question asked by Piotr Pryzmont on Nov 20, 2015
Latest reply on Mar 2, 2017 by Ivica Nedeljkovic

Is there a way to override method from /include/SugarQuery/SugarQuery.php in an upgrade safe manner?


I need to override the method setJoinOn because it doesn't work for custom modules relationships by hardcoding the id

$this->join[$this->rname_link]->on()->addRaw("{$options['baseBean']}_id = '{$options['baseBeanId']}'");


For example my custom relationship ids looks like: sfs_platfoefabccounts_ida, sfs_platfo3e4eccounts_idb so they don't follow the pattern from the stock Sugar relationships: '<module>_id'.