public function getJoinFields($joinDataObj)
    {
        // get the maintable of the joindataobj
        $joinTable = $joinDataObj->mainTableName;
        $returnRecord = array();

        // find the proper join according to the maintable
        foreach ($this->tableJoins as $tableJoin) {
            if ($tableJoin->table == $joinTable) {
                // populate the column-fieldvalue to columnRef-fieldvalue
                // get the field mapping to the column, then get the field value
                $joinFieldName = $joinDataObj->bizRecord->getFieldByColumn($tableJoin->column); // joined-main table

                if (!$joinFieldName) {
                    continue;
                }

                $refFieldName = $this->bizRecord->getFieldByColumn($tableJoin->columnRef); // join table
                $returnRecord[$refFieldName] = $joinFieldName;

                // populate joinRecord's field to current record
                foreach ($this->bizRecord as $field) {
                    if ($field->join == $tableJoin->objectName) {
                        // use join column to match joinRecord field's column
                        $jFieldName = $joinDataObj->bizRecord->getFieldByColumn($field->column); // joined-main table
                        $returnRecord[$field->objectName] = $jFieldName;
                    }
                }
                break;
            }
        }
        return $returnRecord;
    }
public function getJoinFields($joinDataObj)
    {
        // get the maintable of the joindataobj
        $joinTable = $joinDataObj->mainTableName;
        $returnRecord = array();

        // find the proper join according to the maintable
        foreach ($this->tableJoins as $tableJoin) {
            if ($tableJoin->table == $joinTable) {
                // populate the column-fieldvalue to columnRef-fieldvalue
                // get the field mapping to the column, then get the field value
                $joinFieldName = $joinDataObj->bizRecord->getFieldByColumn($tableJoin->column); // joined-main table

                if (!$joinFieldName) {
                    continue;
                }

                $refFieldName = $this->bizRecord->getFieldByColumn($tableJoin->columnRef); // join table
                $returnRecord[$refFieldName] = $joinFieldName;

                // populate joinRecord's field to current record
                foreach ($this->bizRecord as $field) {
                    if ($field->join == $tableJoin->objectName) {
                        // use join column to match joinRecord field's column
                        $jFieldName = $joinDataObj->bizRecord->getFieldByColumn($field->column); // joined-main table
                        $returnRecord[$field->objectName] = $jFieldName;
                    }
                }
                break;
            }
        }
        return $returnRecord;
    }
public function getJoinFields ( $ joinDataObj ) { // get the maintable of the joindataobj $ joinTable = $ joinDataObj -> mainTableName ; $ returnRecord = array ( ) ; // find the proper join according to the maintable foreach ( $ this -> tableJoins as $ tableJoin ) { if ( $ tableJoin -> table == $ joinTable ) { // populate the column-fieldvalue to columnRef-fieldvalue // get the field mapping to the column, then get the field value $ joinFieldName = $ joinDataObj -> bizRecord -> getFieldByColumn ( $ tableJoin -> column ) ; // joined-main table if ( ! $ joinFieldName ) { continue ; } $ refFieldName = $ this -> bizRecord -> getFieldByColumn ( $ tableJoin -> columnRef ) ; // join table $ returnRecord [ $ refFieldName ] = $ joinFieldName ; // populate joinRecord's field to current record foreach ( $ this -> bizRecord as $ field ) { if ( $ field -> join == $ tableJoin -> objectName ) { // use join column to match joinRecord field's column $ jFieldName = $ joinDataObj -> bizRecord -> getFieldByColumn ( $ field -> column ) ; // joined-main table $ returnRecord [ $ field -> objectName ] = $ jFieldName ; } } break ; } } return $ returnRecord ; }
Get all fields that belong to the same join of the input field

@param BizDataObj $joinDataObj the join data object
@return array joined fields array
Get all fields that belong to the same join of the input field