<?php 
    } else {
        ?>
			$strColumns = $objDbRow->GetColumnNameArray();
<?php 
        foreach ($objTable->PrimaryKeyColumnArray as $objPKColumn) {
            ?>
			$strAlias = $strAliasPrefix . '<?php 
            echo $objPKColumn->Name;
            ?>
';
			$strAliasName = !empty($strColumnAliasArray[$strAlias]) ? $strColumnAliasArray[$strAlias] : $strAlias;
			$mixVal = (isset ($strColumns[$strAliasName]) ? $strColumns[$strAliasName] : null);
			if ($mixVal === null) return null;
<?php 
            if ($s = QDatabaseCodeGen::GetCastString($objPKColumn)) {
                echo $s;
            }
            ?>
			$values[] = $mixVal;
<?php 
        }
        ?>

			return static::MakeMultiKey ($values);
<?php 
    }
    ?>
		}
<?php 
} else {
Example #2
0
 /**
  * 
  */
 public static function GenerateAggregate()
 {
     $objDbOrmCodeGen = array();
     $objRestServiceCodeGen = array();
     foreach (QCodeGen::$CodeGenArray as $objCodeGen) {
         if ($objCodeGen instanceof QDatabaseCodeGen) {
             array_push($objDbOrmCodeGen, $objCodeGen);
         }
         if ($objCodeGen instanceof QRestServiceCodeGen) {
             array_push($objRestServiceCodeGen, $objCodeGen);
         }
     }
     $strToReturn = array();
     array_merge($strToReturn, QDatabaseCodeGen::GenerateAggregateHelper($objDbOrmCodeGen));
     //			array_push($strToReturn, QRestServiceCodeGen::GenerateAggregateHelper($objRestServiceCodeGen));
     return $strToReturn;
 }
 public function HasExtendedArrayExpansions(QDatabaseCodeGen $objCodeGen, $objCheckedTableArray = array())
 {
     $objCheckedTableArray[] = $this;
     foreach ($this->ColumnArray as $objColumn) {
         if (($objReference = $objColumn->Reference) && !$objReference->IsType) {
             if ($objTable2 = $objCodeGen->GetTable($objReference->Table)) {
                 if ($objTable2->HasImmediateArrayExpansions()) {
                     return true;
                 }
                 if (!in_array($objTable2, $objCheckedTableArray) && $objTable2->HasExtendedArrayExpansions($objCodeGen, $objCheckedTableArray)) {
                     return true;
                 }
             }
         }
     }
     return false;
 }