コード例 #1
0
 /**
  * 
  * Fixes the eager params based on the settings for this related.
  * 
  * Adds a column prefix when not already specified.
  * 
  * If there are sub-eagers, sets the merge strategy to 'client' so that
  * the sub-eagers are honored.
  * 
  * On a server merge, sets the join flag.
  * 
  * @param Solar_Sql_Model_Params_Eager $eager The eager params.
  * 
  * @return void
  * 
  */
 protected function _fixEagerParams($eager)
 {
     if (!$eager['cols_prefix']) {
         if ($eager['alias']) {
             $eager->colsPrefix($eager['alias']);
         } else {
             $eager->colsPrefix($this->name);
         }
     }
     // if there are sub-eagers, merge this eager client-side; otherwise,
     // the sub-eagers won't be honored.
     if ($eager['eager']) {
         $eager->merge('client');
     }
     parent::_fixEagerParams($eager);
     if ($eager['merge'] == 'server') {
         $eager->joinFlag(true);
     }
 }
コード例 #2
0
 /**
  * 
  * Fixes the eager params based on the settings for this related.
  * 
  * Always removes the column prefix.
  * 
  * @param Solar_Sql_Model_Params_Eager $eager The eager params.
  * 
  * @return void
  * 
  */
 protected function _fixEagerParams($eager)
 {
     // never use a cols prefix
     $eager->colsPrefix(null);
     // go on
     parent::_fixEagerParams($eager);
 }