Hi all,
I am a bit rusty with Backendless after more than a year off the platform - but I am trying to do something I am sure is quite simple if I only do it the right way. I have a Company table, and Users are connected to 1 company (many:1). When a Boolean value is set on the Company table (subscriptionActive), I want a similar Boolean to be set on the User objects connected to that company (so that I can later use the User object to know the subscription status for the user without looking up the corresponding Company).
Does this make sense?
If so - what is the most economic way of handling this?
Thanks in advance! 
Hi Egil,
Rather than replicating the value between two related tables, I recommend retrieving the column from Company when you retrieve User objects.
Regards,
Mark
How should I go about doing that then? This is what I currently have in the code:
Should I do a new separate call after verifying the login and then add that to the object, something like:
Or is it possible to do the verification of the user and fetch the data in one db call?
Hi Egil,
Yes, it will require a separate call. The Login operation is scoped to return the authenticated user. Unfortunately, it cannot be expanded to enrich the returned data structure without additional requests to the database.
Regards,
Mark
Understood. I need similiar calls then I guess when using Update User blocks, which I see I have some places?
Updating a user and related tables can be done with a single call using the DeepDave API. Give it a try and let us know if you need any help with it.
Regards,
Mark