Index: AkBelongsTo.php =================================================================== --- AkBelongsTo.php (revision 1225) +++ AkBelongsTo.php (working copy) @@ -222,11 +222,15 @@ } } - $finder_options['joins'] = $this->Owner->$association_id->constructSqlForInclusion(); + $finder_options['joins'] = !empty($options['joins'])? $options['joins'] : $this->Owner->$association_id->constructSqlForInclusion(); - $finder_options['selection'] = ''; - foreach (array_keys($this->Owner->$association_id->getColumns()) as $column_name){ - $finder_options['selection'] .= '_'.$association_id.'.'.$column_name.' AS _'.$association_id.'_'.$column_name.', '; + if (!empty($options['selection'])) { + $finder_options['selection'] = $options['selection']; + } else { + $finder_options['selection'] = ''; + foreach (array_keys($this->Owner->$association_id->getColumns()) as $column_name){ + $finder_options['selection'] .= '_'.$association_id.'.'.$column_name.' AS _'.$association_id.'_'.$column_name.', '; + } } $finder_options['selection'] = trim($finder_options['selection'], ', '); @@ -284,4 +288,4 @@ } -?> \ No newline at end of file +?>