学说标准相同的具有不同价值的领域

$columnName = "date";
$criteria = new Criteria();
$criteria->andWhere($criteria->expr()->gte($columnName, $startDate));
$criteria->andWhere($criteria-expr()->lte($columnName, $endDate));

This will cause "Invalid parameter number: number of bound variables does not match number of tokens" It will generate SQL like this

...AND (table.date >= :date AND table.date <= :date)

how do I fix it? It seems like eventhough it has the correct parameter, the name of the field in sql is the same