I have a relationship from my Users table to another table called “Org”. When a user logs in, I need to get information about their org, e.g., the organization name. If I turn on autoload for the org column in the Users table, I can access the org table and all the org properties. I know there are some performance/scalability issues with autoload so I want to find out if there’s an efficient way to get the org object when a user logs in without using autoload. Some ideas I’m considering and would like your feedback on:
- Use autoload. Pros: It works and the code is clean. Cons: Not sure if performance will be an issue if the number of users or organization grows significantly.
- After user login, run a query to get the user’s data object again and use the addRelated QueryOption to make sure I get the org object. Pros: It should scale better than autoload. Cons: It seems inefficient to run a query for a user object I already have from the login response.
Are there other options I should be considering? Is there a chance Backendless might include the objectId for relation properties when autoload isn’t turned on? This would allow developers to get the related object quickly and efficiently using the findID query.
Thanks,
Jeff