Execute Retrieve over association in browser (client) - Mendix Forum

Execute Retrieve over association in browser (client)


When using a “retrieve over association” on a page or in a nanoflow in an online web app, the client calls the server although all information may be in cache. Especially when both the owner and the referred object of the association are non-persistent entities, it should be technically possible to return the requested object(s) without a call to the application server.


Being able to execute the “retrieve over association” in the client instead of on the server means a huge performance improvement, as no connection has to be made sending the current state.


Currently, you can't fix this using a javascript action in a nanoflow, as you have to use the mx.data.get function to retrieve associated object(s), which will call the server with a retrieve_by_path operation. See also https://community.mendix.com/link/questions/89974 where this “strange behaviour” is being questioned.

1 answers

One note: I believe the fetch() function from an MxObject is capable of getting data from the browser’s object cache:


In some previous testing I was able to confirm that this code did not execute a network call:

myObject.fetch("TestModule.SelectedOrders/TestModule.Order", function(orderList) {