Go to Google Groups Home    doctrine-user
Problem comparing two fields in HAVING clause

Michi <mhauptm...@gmail.com>

Hi everybody,

I'm trying to execute a query with a subquery and a HAVING clause. In
the HAVING clause I need to compare the result of the subquery to a
field in the SELECT clause like "paid < total_amount".

The problem is that Doctrine doesn't recognize the second field name
as such and I always get a SQLSTATE error complaining that the column
could not be found.

Is that a bug in Doctrine or am I doing something wrong?

Thanks for your help,
Miguel