Issue with changing user's password

Hello! I try to change the password for the app user (in Data -> Users, field password) but for one specific user I can’t do it and get a lot of errors like:

Backendless encountered an error while handling the request. An internal trouble ticket with ID 21FC2546-5690-C7E0-FFFA-9ED03AC26000 has been created and we will be investigating the issue.
java.lang.RuntimeException: java.lang.StackOverflowError
java.lang.RuntimeException: java.lang.RuntimeException: …

I do it directly on the backendless website (management console). I got this error for one specific user. For another users I have tested - it worked well. What could it be and how can it be fixed?

Please let us know application ID and objectId of the user in question.

Regards,
Mark

APP ID: 7D0CA196-6BFB-3B9F-FF01-EBB42A286700
objectId: 9822DE8B-F5BB-C9DC-FF4B-7F96936AD300

Hello,

I was able to reproduce the error and this is something we need to investigate. However, I was able to change the password using REST Console:

It looks like you have a circular dependency in the relations. Users points to Profiles, which in turn points to `Users. For that specific user the Profiles object points back to him and that causes the circular dependency which causes the error in password update. I am not saying it should not work, but I am pointing out a deficiency in the data model.

Regards,
Mark

Thank you!
How would you recommend to get Users data from Profile table in such case in Backendless? I mean to request profile table and get parent user data in the same request. Just remove relation from Users and get all profiles by making additional query to profiles (if I try the opposite case - get all profiles for a user). Or is there any possibility to JOIN all children in the same request as in SQL?

In order to get the user object associated with a specific profile, you’d run a query against the Users table with the following where clause:

profiles.objectId = 'profile-objectId'

For example, for the user in question in this thread, their profile’s objectId is E31ECACA-AA3B-66CA-FF96-8C4A24114800, so when you use the following where clause:

profiles.objectId = 'E31ECACA-AA3B-66CA-FF96-8C4A24114800'

You get the user object back (see the screenshot below). As a result, the relationship from Profiles to Users is not needed.

How can I get all profiles against the User? In case if I do not know particular profile.objectId-s but need to list all children? (Users -> Profiles as one to many)

You already have a relation from user to profiles. To get all profiles for a user you use that relation.

My point was that the relation column from profiles to user is rudimentary and not necessary, it leads to problems because it causes a circular dependency.

Ok, thank you! WHERE helps.