12
Views
2
Comments
Solved
Aggregate/SQL query test results different than output
Application Type
Traditional Web

I am using an aggregate and a SQL Query. There is an attribute UserId on one of the entities of the aggregate/SQL query. When the user is different than NullIdentifier(), everything goes fine. When the user is NullIdentifier the test results of both the aggregate and SQL Query are different than the output.

I have put a filter on the aggregate as such:

(RequestedBy <> NullIdentifier() and FileRequest.RequestedBy = RequestedBy) or FileRequest.RequestedBy = NullIdentifier()

I'm supposed to catch any file request detail that is attached to the file request of the userId and clientId as the left join of both entities with the join condition

FileRequest.Id = FileRequestDetail.FileRequestId and (FileRequestDetail.FileRequestTypeId = Entities.FileRequestType.Client or FileRequestDetail.FileRequestTypeId = Entities.FileRequestType.ClientSystem)

The test clearly show that I have a FileRequestDetail record. However, when I run the application, the FileRequestDetail is empty.

Does anyone has a clue of why this is happening?

Kind regards.

 

Rank: #856
Solution

The problem was that I solved the issue but I had to explicitly refresh dependencies because even when I did Refresh All, the Action was not refreshed... 

Thank you João

Rank: #70

Hi Andi,


Usually this case is related to a difference in input parameters so my suggestion is to debug your application and inspect the input parameter values. You may stumble upon a different values in parameters in runtime than what you were using when testing the query, which explains the different results.

This kind of behaviors can also be related to cache but it doesn't seem that you are using cache for queries as it needs to be set explicitly.


Hope it helps.


Regards,
João

Rank: #856
Solution

The problem was that I solved the issue but I had to explicitly refresh dependencies because even when I did Refresh All, the Action was not refreshed... 

Thank you João