Using OQL and storing an association

0
Hi, I am using the “Retrieve OQL” widget to grab and summarise a load of data in the simplest, fastest way into a list of an Entity called Statistics. This data should be associated to another Entity, “Employees”. How when I write the OQL Query am I able to store the association to Employees in the Statistics Entity? Thanks, Steve
asked
2 answers
1

I don’t think you can. OQL always returns unstructured data. You can join tables so you are able to add Employee’s id to the table using something like LEFT OUTER JOIN MyModule.Statistics/Statictic_Employee/MyModule.Employee as Emp

Then postprocess the results by retrieve, loop and change object Statistics.

answered
0

I have looked at doing something with the ID’s. But whilst I can store the employee ID, I can’t seem to retrieve anything with it using XPath, with the message that they are incompatible datatypes (I have tried Long and String)

answered