[Cubicweb] RQL - ** can only one uid restriction per variable (use IN for X if desired)
Adrien Di Mascio
adrien.dimascio at logilab.fr
Mon Jan 21 18:19:10 CET 2013
Le 18/01/2013 16:16, Carlos Balderas a écrit :
> Is it possible to have the "eid" value as returning column in a RQL
> Query when using eid in the WHERE clause?
As Alexandre said, it's a current limitation and I don't know if there's
any plan to lift it.
> For instance, running this query leads me to an error
> BadRQLQuery: Any N,I WHERE X is Company, X name N, X eid 5562, X eid I
> ** can only one uid restriction per variable (use IN for X if desired)
In your specific case, you could do :
Any N,X WHERE X is Company, X name N
In the python code, "X" would be an int, but in your rset's description,
it would be "Company". If you want to have "Integer" in your rset's
description, you can use the following trick :
Any N, CAST(Int, X) WHERE X is Company, X name N
Adrien Di Mascio - LOGILAB, Paris (France).
Formations - http://www.logilab.fr/formations
Développements - http://www.logilab.fr/services
Gestion de connaissances - http://www.cubicweb.org/
More information about the Cubicweb