Browse files

fixing issue #248 allowing the use of custom PropelFormatter with select

  • Loading branch information...
1 parent 49416d3 commit b4727af0a7ab4aa2042d42633b334ef1f6323bb9 Gabriel Pillet committed with willdurand Jan 13, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 runtime/lib/query/ModelCriteria.php
View
7 runtime/lib/query/ModelCriteria.php
@@ -534,8 +534,11 @@ protected function configureSelectColumns()
return;
}
- // select() needs the PropelSimpleArrayFormatter
- $this->setFormatter('PropelSimpleArrayFormatter');
+ // select() needs the PropelSimpleArrayFormatter if no formatter given
+ if (is_null($this->getFormatter()))
+ {
+ $this->setFormatter('PropelSimpleArrayFormatter');
+ }
// clear only the selectColumns, clearSelectColumns() clears asColumns too
$this->selectColumns = array();

0 comments on commit b4727af

Please sign in to comment.