Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Transaction Patterns » List2 with multiple parent relations to the same table
icon7.gif  Re: List2 with multiple parent relations to the same table [message #1783 is a reply to message #1778] Thu, 30 October 2008 11:51 Go to previous message
ikatz is currently offline  ikatz
Messages: 40
Registered: December 2007
Location: Durham, NH
Member
PERFECT!

I added a _cm_pre_getData function to my vehicle class and everything works as expected:
    function _cm_pre_getData ($where, $where_array, $fieldarray=null)
    // perform custom processing before database record(s) are retrieved.
    // (WHERE is supplied in two formats - string and array)
    // $fieldarray may contain full details of the current record in the parent
    // class, not just its primary key.
    {
        $pattern_id = getPatternId();
        switch (strtolower($pattern_id)) {
            // may need to change the contents of $where
            case 'list2':
                // alter key
                $where = str_replace('organization_id=', 'owner_organization_id=', $where);
                break;

            default:
        } // switch

        return $where;

    } // _cm_pre_getData
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon7.gif
Previous Topic: hyperlink in list or detail or tree form
Next Topic: PDF Report
Goto Forum:
  


Current Time: Sat Dec 28 05:17:58 EST 2024

Total time taken to generate the page: 0.00927 seconds