[Cubicweb] An rql bug ?

Christophe de Vienne christophe at unlish.com
Wed Feb 11 11:41:06 CET 2015



Le 11/02/2015 11:13, Nicolas Chauvat a écrit :
> On Wed, Feb 11, 2015 at 09:48:24AM +0100, Alain Leufroy wrote:
>> RRQLExpression('EXISTS(U can_run O) OR EXISTS(U can_run X, O in_project X)')
>>
>> Adding this permission rule fails with a "type inconsistancy"
>> exception from rql.
> 
> It is simpler and safer to assume that you can not "share" variables
> between the two parts of an OR.
> 

"share" -> "redefine", or something like that. One can use a variable
that get determined outside the OR (here, 'E'):

Any X WHERE X owned_by U, U attends E, EXISTS(E activity A, ...) OR
EXISTS(E subevent E1, E1 activity A1, ...)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20150211/f3649580/attachment-0214.sig>


More information about the Cubicweb mailing list