I encountered an issue while trying to build a query with a BIT_AND condition on a parameter in a Group Concat select statement.
The problematic line is:
The query (the aidant parameter is set later in a simple where clause, so it does exists in the query):
If I execute the query, I get an exception "the query define 1 parameter but you bound 2"
If I comment the "setParameter("teacherLeaved", STATUT)", I get an exception "the query define 2 parameters but you only bound 1"
If I explicitly define the value in the select BIT_AND and remove the "setParameter("teacherLeaved")", everything works well.
I'd tried to use BIT_AND(aa.status, (:teacherLeaved param)) as described here, for param in a select but it don't work neither (i also tried without the "param" at the end of the parenthesis).
I don't really get the point here, is there a reason or is it a lack of support for this kind of usage?
Right now to make it work, i'm just concatenating my value in the select clause and it works like a charm, but i would like to understand the problem.
Hi,
I encountered an issue while trying to build a query with a BIT_AND condition on a parameter in a Group Concat select statement.
The problematic line is:
The query (the aidant parameter is set later in a simple where clause, so it does exists in the query):
If I execute the query, I get an exception "the query define 1 parameter but you bound 2"
If I comment the "setParameter("teacherLeaved", STATUT)", I get an exception "the query define 2 parameters but you only bound 1"
If I explicitly define the value in the select BIT_AND and remove the "setParameter("teacherLeaved")", everything works well.
I'd tried to use BIT_AND(aa.status, (:teacherLeaved param)) as described here, for param in a select but it don't work neither (i also tried without the "param" at the end of the parenthesis).
I don't really get the point here, is there a reason or is it a lack of support for this kind of usage?
Right now to make it work, i'm just concatenating my value in the select clause and it works like a charm, but i would like to understand the problem.