I have been testing around and this seems to be a limitation of the Entity view/OQL Editor. A workaround is to copy the ID in another attribute. This can be done in an after-create microflow or a batch microflow for existing data.
Hi all,
we will need this as well.
One of use case: have a View Entity to add aggregated data (which we want to reuse then) and still have ID there (for example to allow retrieve record selected in UI)
(and we don't want add any additional unique attribute just as a workaround for not fully accessible ID)
Thank you.
Mendix 10.21 release notes state:
See: https://docs.mendix.com/releasenotes/studio-pro/10.21/#10210
Should be solved in my understanding.
Workaround is only workable for specific cases.
In general: we do not want to copy ID in another attribute for tons of entity types.
I hope Mendix can fix Entity view/OQL Editor so SELECT CAST(ID as STRING) is again ok
Tested: In OQL it still works so existing code not affected, so just Entity view/OQL Editor issue.
Using GUID to generically get objects from OQL query results.
I do have the same issue with the view/OQL Editor. It needs to be fixed.
My OQL is executed in a java action. So I use a hack to change the OQL dynamically.
statement = statement.replaceFirst("SELECT", "SELECT cast(");
statement = statement.replaceFirst("/ID", "/ID as Long)");