MarkMpn/Sql4Cds

Inner join with audit does not returns expected result...

sybaris opened this issue · 1 comments

Hi

The following query does not returns correct rows :

select count(*)
from systemuser 
inner join Audit on systemuserid = userid
where systemuserid='...'

image

I take the systemuserid of a user.
So I find 1 user in systemuser.
This user have 183 rows in audit table.
So when we are making an inner join between this 2 datasets, I except to have 183 rows.
Instead, we have 1234874 rows.
Note that 1234874 is also the number of rows of Audit table...

Regards
Sybaris

Thanks for the details. It looks like the server is interpreting the inner joins as outer joins. With some more testing I've found some more attributes that it doesn't seem to support filtering on either, listing them here for my reference to fix shortly:

  • attributemask
  • userid & callinguserid (with eq-userid and ne-userid conditions)
  • objectidname