OQL execution issue : Could not find result association module$entity.ID in target object.

0
 Hi, I am facing one issue on OQL statement execution. I am trying to get list of entities. Lets asssume Employee entity. I write query like Select * from ModuleName.Employee. this is the simple query . But I am getting Could not find result association module$entity.ID in target object error. I know this is because of “ID” is not in my Domain model . So that it throws this error. Fine. Then what is the solution is , to write all the attributes names one by one then we can get result. is that is the convenient way?   because later/sometime if we added some additional attributes in the domain model, again we need to update OQL statement. I don’t know why ID is coming as a result of OQL. or there is some solution have to be given from mendix side. Id is can not be created by ourself since its reserved. also we dont want that . then why mendix populates that id in OQL result. I explored all the documentation for OQL. there they have provided simple query . but i dont know how to write complex queries. even for a simple query i have tried its throws error. any one have idea how to overcome this issue 
asked
1 answers
0

Although not visible in Mendix, internally every object has an ID. Those are the numbers you see in the debugger for an object or association.

 

so if you run in Mendix 8

 

select * from Sample.Customer

the result is

If this does not work in your version, file a support ticket.

 

answered