Retrieving data works locally but not on live environment

0
Dear Community, In our application we run into an issue related to retrieving from data via association (tried in Mendix versions 9.6.4 and 9.9.0 as well) We retrieve an entity (which is commited before) via association and locally the attribute is provided with data and we can use it in further logic. On our live environment (Environment = Test) is the attributes are empty and we have no idea what is possibly wrong. The retrieved object have the same ID as we expected, but attributes are empty. Any idea? Is it a possibly corrupt database? We've tried a lot (including getting from database) but even this only works locally. Greetz, Jeroen.
asked
4 answers
0

Did you do live debugging on the Test environment? And what if you downloaded the database and do a local restore? Because then you can check what there is actual in the database.

I do not believe in a corrupt database unless you fire sql directly with Java on your database.

So try the live debug first and secondly inspect the postgres database locally.

Regards,

Ronald

 

answered
0

Thanks Ronald, yes we did. We restored the database but locally everything went right but on our test environment it goes wrong.

Our acceptance environment works fine.

answered
0

I think you make a "where is my data” mistake.

If you retrieve it by association, it will first try to retrieve it from memory, if not found then from database. So in rare cases (and you might have found one) you can have the object empty in your memory as found by association and while your database version has data.

Guess when you would change the retrieve from database (with association as constraint) then you'll find the object with data.

Solution; check what is happening in your memory before the commit and retrieve.

answered
0

Thank you both for your support.

There is no change between the commit and the retrieve. This issue only occurs on our test environment, but not locally, on acceptance environment and on our production environment.

For now we have added it to our backlog so we are able to dive into it again later, since it is not an issue on the necessary environment(s).

answered