Retreive by association for uncommitted objects gives Empty List

0
Hi All, Hope everyone is doing good and keeping safe. I have a weird issue while retrieving objects by association which are needed for changing the main object. I have questionaire application where questions are loaded dynamically in a list view. This list view is an editable line item where the associated objects are displayed for the question. Main Parameter of the page – DGM_object. We have an object called temp_answerobject(uncommitted,1-* with DGM_object) which is created while editing the main DGM_object based on the number of questions. A list of temp_answerobject is created while editing the DGM_object. This objects are getting created while each edit and associated with the DGM_object(gets committed) in the edit microflow. DGM_object – committed and temp_answerobject is uncommitted. While executing an onchange microflow of the question object we retrive the temp_answerobject which is associated with DGM_object and filter it based on the question code and save the answers(draft) in  temp_answerobject. This temp_answerobject list retrival is getting failed in PROD sometimes and there is no  particular scenario to  reproduce this issue in local. We used retrieve by association to use the uncommitted in memory objects and we cant make it commitable because concurrent session might mesh up the data flow between 2 different users. Kindly let me know why retrieval by association gives empty results even for freshly created session objects. I tried keeping the object as “Refresh in client” but still didnt help . let me know your comments. Thanks a lot in advance 
asked
1 answers
1

It's hard to help you because there isn't a clear reproduction scenario for your local dev environment.
I expect that somewhere in your logic a new object is being created which may cause your association to fall away but again, that's hard to say.
You can try to use the debugger linked to the production environment to find out if you are losing the association somewhere.

This may be a little unusual but good to know:
You can commit your non persistent objects: committing non-persistable entities records the current attribute values and association values in memory. I'm not saying this is THE solution, but it's good to know now.  https://docs.mendix.com/refguide/persistability#non-persistable

answered