How To Add Related Data Objects Automatically When User signs Up

I have being trying to figure out how to get out from this challenge for two days now. I will be very glad if someone can show me better approach. I have a user table that has a relation ship to another table {Match_Scores}
I want when a new user sign up to my application he will be able to load data from Match_Scores and also update it. I can manually add related data objects using the console but is there a way to do it through code.
In summary I want each user in User Table to have separate data in Match_Scores table

Hi, Victor
This can be handled in Backendless custom business logic. You’d create an API event handler for the “Register” event where you should add data to the relative table.
You can find out more about the custom business logic in our docs: https://backendless.com/documentation/business-logic/java/bl_user_service_handler.htm

Regards,
Ilya

Hi Ilya

Thanks for the support am new to backendless, have read the business logic documentation but still not certain of where to start from. Can you point me to a link with an example that solves similar issue.

Thanks

Sorry, probably I misunderstood your question.

If what you are asking is ‘How to retrieve a data related to another data’ please check out the documentation topic about Relations Retrieval

Regards,
Ilya

Hi Iiya

Thanks for trying to solve my doubt, if you can take a look into the picture I uploaded. I said I can retrieve the related data objects when added through the console. I dont want to be manually adding the related data objects when a new user signs up. I there a way to add it through java

Thanks

Hi Victor,

Please tell me what SDK do you use?

Regards,
Ilya

I use Android SDK and my question in short is must I add the related data objects to my Users table each time a user signs up. I tried the auto load approach but it is not loading the related data objects automatically in the console.
I can retrieve the related table once I manually add it from the console but I dont want to be manually doing it all time a user signs up. Hope you understand my problem. I want a better approach in solving this problem.

Thanks

Sure you have to ‘tie’ User with related object, you can do it in several ways:

  1. from console as you do it
  2. from code on android: after you register the User, you have to add related property to it and save registered User
  3. from business logic in afterRegister event

Thank You Sergey I solved my problem from this link http://support.backendless.com/knowledge-base/article/registeringupdating-a-user-with-related-data-objects