コード例 #1
0
 /**
  * Convenience method to get the default Join Type for a relation.
  * If the key is required, an INNER JOIN will be returned, else a LEFT JOIN will be suggested,
  * unless the schema is provided with the DefaultJoin attribute, which overrules the default Join Type
  * 
  * @param ForeignKey $fk
  * @return     string
  */
 protected function getJoinType(ForeignKey $fk)
 {
     return $fk->getDefaultJoin() ? "'" . $fk->getDefaultJoin() . "'" : ($fk->isLocalColumnsRequired() ? 'Criteria::INNER_JOIN' : 'Criteria::LEFT_JOIN');
 }
コード例 #2
0
ファイル: OMBuilder.php プロジェクト: keneanung/gw2spidy
 /**
  * Convenience method to get the default Join Type for a relation.
  * If the key is required, an INNER JOIN will be returned, else a LEFT JOIN will be suggested,
  * unless the schema is provided with the DefaultJoin attribute, which overrules the default Join Type
  *
  * @param  ForeignKey $fk
  * @return string
  */
 protected function getJoinType(ForeignKey $fk)
 {
     if ($defaultJoin = $fk->getDefaultJoin()) {
         return "'" . $defaultJoin . "'";
     }
     if ($fk->isLocalColumnsRequired()) {
         return 'Criteria::INNER_JOIN';
     }
     return 'Criteria::LEFT_JOIN';
 }