HI Community,Today, I wishing share to everyone that, to get/select ID of a entitie, using OQL, must declare CAST (function converts an expression to a specific data type). For this, the atribute of return entitie, must be same type of specificated in CAST.The syntax is as follows:CAST ( expression AS data_type )My Example: 'SELECT CAST(c.ID AS Long) AS Entitie_IDFROM MyModule.Entitie AS c'To more: OQL CAST | Mendix Documentation
asked
Matheus Jesus
1 answers
0
Hi, thanks for sharing.
I’m not fully understanding what the actual question/doubt is here. Are you facing an issue retrieving the entity ID using OQL, or are you sharing a workaround/solution that worked for you?
Could you please clarify the specific problem you encountered (for example, the error you got when selecting ID directly without CAST) so the community can help more effectively?