I've discovered the same issue, with the symfony doctrine plugin Revision 23394. I just updated to the latest version and a "andWhereNotIn" clause which worked perfectly before is now failing -
$q->andWhereNotIn('hr.providerid', $ignoreProviderIds);
where $ignoreProviderIds = array('51', '31');
The stack trace is making it look like it's repeating the parameters somehow? Note the "'51', '31', '51', '31'" line below...
- at ()
in SF_ROOT_DIR/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection.php line 1086 ...
1083.
1084. $name = 'Doctrine_Connection_' . $this->driverName . '_Exception';
1085.
1086. $exc = new $name($e->getMessage(), (int) $e->getCode());
1087. if ( ! isset($e->errorInfo) || ! is_array($e->errorInfo))
{
1088. $e->errorInfo = array(null, null, null, null);
1089. }
- at Doctrine_Connection->rethrowException(object('PDOException'), object('Doctrine_Connection_Statement'))
in SF_ROOT_DIR/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection/Statement.php line 253 ...
250. } catch (Doctrine_Adapter_Exception $e)
{
251. }
252.
253. $this->_conn->rethrowException($e, $this);
254.
255. return false;
256. }
- at Doctrine_Connection_Statement->execute(array('51', '31', '51', '31'))
in SF_ROOT_DIR/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Connection.php line 1014 ...
1011. try {
1012. if ( ! empty($params))
{
1013. $stmt = $this->prepare($query);
1014. $stmt->execute($params);
1015.
1016. return $stmt;
1017. }
else
{
# at Doctrine_Connection->execute('SELECT DISTINCT h6.hotelid, COUNT(h10.hotelid) AS h10__0 FROM hotel h6 LEFT JOIN hotelDetails h7 ON h6.hotelid = h7.hotelid LEFT JOIN hotelProvider h8 ON h6.hotelid = h8.hotelid LEFT JOIN hotelPriceDetails h9 ON h6.hotelid = h9.hotelid LEFT JOIN location l4 ON h6.locationid = l4.locationid LEFT JOIN location l5 ON h6.locationid = l5.locationid LEFT JOIN locationAdmin1Code l6 ON l5.admin1codeid = l6.locationadmin1codeid LEFT JOIN hotelRating h10 ON h6.hotelid = h10.hotelid WHERE h6.hotelrating >= 3.0 AND h6.hotelrating < 5 AND h6.hotellatitude IS NOT NULL AND h6.hotellatitude != 0 AND h6.hotellongitude IS NOT NULL AND h6.hotellongitude != 0 AND h9.hotelavgminprice < 500 AND h6.hotelstars >= 2 AND h6.locationid = 33033 AND h10.providerid NOT IN (?, ?) GROUP BY h6.hotelid HAVING h10__0 > 0 ORDER BY h6.hotelrating desc LIMIT 3', array('51', '31', '51', '31'))
in SF_ROOT_DIR/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query.php line 1155 ...
1152. $this->useQueryCache(false);
1153.
1154. // mysql doesn't support LIMIT in subqueries
1155. $list = $this->_conn->execute($subquery, $this->getParams($params))->fetchAll(Doctrine::FETCH_COLUMN);
1156. $subquery = implode(', ', array_map(array($this->_conn, 'quote'), $list));
1157.
1158. break;
# at Doctrine_Query->getSqlQuery(array('51', '31'))
in SF_ROOT_DIR/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Abstract.php line 977 ...
974. }
975. }
976. } else
{
977. $query = $this->getSqlQuery($params);
978. }
979. } else
{
980. $query = $this->_view->getSelectSql();
# at Doctrine_Query_Abstract->_execute(array('51', '31'))
in SF_ROOT_DIR/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Query/Abstract.php line 1036 ...
1033. $result = $this->_constructQueryFromCache($cached);
1034. }
1035. } else {
1036. $stmt = $this->_execute($params);
1037.
1038. if (is_integer($stmt)) {
1039. $result = $stmt;
- at Doctrine_Query_Abstract->execute()
in SF_ROOT_DIR/apps/frontend/modules/common/actions/components.class.php line 1129 ...
Possible to give some more information? Code you're using to produce the error. We need to be able to produce the issue with some code in order to fix it. If you could make a test case that will help us. Otherwise it is very difficult to fix an issue blindly
Thanks. Something that also helps is singling out the revision that caused the problem.