The issue is happening because the returned result structure from OQL does not match the structure of your Non-Persistable Entity.
With View Entities, Mendix internally handles the result set, and if the query does not define the result shape properly, additional metadata/identifier columns can appear during mapping.
Instead of trying to map the generated ID, I normally keep the OQL result exactly aligned with the expected output.
A common approach is:
SELECT
AuditName AS Name
FROM AppMain.AuditUserView
GROUP BY AuditName
The idea is:
Example:
Non-Persistable Entity:
AuditResult └── Name (String)
OQL:
SELECT
AuditName AS Name
FROM AppMain.AuditUserView
GROUP BY AuditName
Now the runtime mapping becomes: AuditName → Name without expecting the generated ID column.
This approach keeps the OQL result clean and avoids the mapping error.
Kindly mark this as the accepted answer if it helps.