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 {
try {
// 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->strName, $this->strPrimaryKey, $objJoinCondition);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
// Next, Expand the Selection Fields for this Table (if applicable)
if ($blnExpandSelection) {
call_user_func(array($this->strClassName, 'GetSelectFields'), $objBuilder, $strParentAlias . '__' . $this->strName);
}
// Return the Parent Alias
return $strParentAlias . '__' . $this->strName;
}
}