Issue with retrieving data via association with current session in Mendix 9.3.0
Hi All, We have recently upgraded our project from Mendix 8.12.1 to 9.3.0. Post upgrade we have noted that some of our existing functionality is not working. We found that data retrieval over association with current session is behaving weird. This is what happening. We have reference selector where we are using selectable Object microflow to restrict the data to show in the dropdown based on some filter criteria. In the above step we are fetching all the data over association with current session and then performing the list operation to filter the data and returning the filtered list to reference selector. Till now all works fine. The current session has 28 records associated with the X entity and it is showing all 21 records and when filter condition is applied it returned 21 records and excluded 7 records. Now when user selects any value form the reference selector over association Y/Y_Z/Atribute1, we are calling an on change microflow to perform some validation. There we see the association is behaving strange. Here when we are fetching all the data over association with current session again it is returning only the excluded records form the step 2 mentioned above. Second thing is that On Change Microflow , has Y entity as an Input param. But when I try to read the selected value from the reference selector over association Y/Y_Z/Atribute1, I do not get any result, it is empty. But I can see a value over association Y/Y_Z. All the associations are at session levels and they are not committed to actual Y and Z tables which are persistent tables. I am not sure what is causing the issue and how do we fix it. Any suggestion would be appreciated.
Dilip Kumar Shaw
Hey there, not sure why it is not working, but a probable solution would be to:
use a non-persistent entity to store all associated objects and the eventual selected object. This way you might get some control.
@Geoffrey Doornbosch Thanks for your response, but it seems to introduced in reference selector behavior with upgrade. Even with non-persistent it is behaving same. The only way is working is to commit the data. I tried this approach and it is working. Not a good solution though but this is the only way to tackle this issue.