How to store app settings per user

0
I have an entity to store my app settings. My requirement is once the user saves the settings same settings should be retrieved from database every time he connects to the app. I tried below steps but its not working  Create and entity and have an association to User as shown below ​              Microflow retrieves the data using association as below   At present I am running the app locally in mendix modeler. Whenever I stop and re run its returning the empty entity values also sometimes in the middle it auto disconnects and my settings are getting cleared. Looks like its auto assigning a new user.  Any help on what am I doing wrong and any suggestion to implement my requirement? 
asked
4 answers
1

Do you have anonymous users enabled?  If so, everytime you navigate to the app, or restart the app, a new $currentUser is created.

When does this microflow run?  After login? Some other time?

answered
0

Seems to me an issue with the user not having access to the settingsSingleton entity or when you create the object in the settingsSingleton the association to the user is not set.

answered
0

I am setting as shown below

Still its not working.

After checking database entries I realized its creating new user entry every time I stop the server and start it again. How can I avoid it?

answered
0

It looks like your Action doesn't have a commit so it isn't stored in the database? After every sign in a new object is created..

answered