access group not working correctly

Hi,

When I use access group where clause with

{E}.user.id = :session$userId

it’s not recognizing the OR clause anymore like :

the idea is that if bu_type is CAR then don’t check for user, but if SUP then do the check…

{E}.bu_type = 'CAR' or ( {E}.bu_type = 'SUP' and ({E}.user.id = :session$userId) )

Am I doing anything wrong or is there any bug in cuba platform ?

Operation Type : Read
Check Type: Check Database
Test is OK.

database is SQL Server 2012

I think this is a bug, since this is not happening only with SQL Server ddb, but also HSQLDB.

Anyone can support ?

Hi,
“{E}.user.id” statement is transformed to inner join in the resulting SQL query, so entity instances with the empty user are not selected.
Try to adjust the constraint as on the screenshot (with the left join).
public://attachments/472ff95c4f89b3749f0559672b3a39a1.jpg
Regards.

472ff95c4f89b3749f0559672b3a39a1

Hi Rostislav,

I missed the left join, now it’s working.

Thanks!