public function GetColumnAliasHelper(QQueryBuilder $objBuilder, $strBegin, $strEnd, $blnExpandSelection, QQCondition $objJoinCondition = null)
{
// Are we at the Parent Node?
if (is_null($this->objParentNode)) {
// Yep -- Simply return the Parent Node Name
return $this->strName;
} else {
// No -- First get the Parent Alias
$strParentAlias = $this->objParentNode->GetColumnAliasHelper($objBuilder, $strBegin, $strEnd, $blnExpandSelection);
// Next, Join the Appropriate Table
$objBuilder->AddJoinItem($this->strTableName, $strParentAlias . '__' . $this->strName, $strParentAlias, $this->objParentNode->_PrimaryKey, $this->strForeignKey, $objJoinCondition);
// Next, Expand the Selection Fields for this Table (if applicable)
// TODO: If/when we add assn-based attributes, possibly add selectionfields addition here?
if ($blnExpandSelection) {
call_user_func(array($this->strClassName, 'GetSelectFields'), $objBuilder, $strParentAlias . '__' . $this->strName);
}
// Return the Parent Alias
return $strParentAlias . '__' . $this->strName;
}
}