Unfortunately the subject of the question seems a bit vague, but I don't know anything better. So, I am making a project using Hibernate, PostGreSQL and Spring. As per the functionality the database can be divided into 3 parts. Considering a simple product based app, as Users(U), Products(P), Messages(M). I have a single database, where I have made tables and defined relationships.
As a user might have one-to-many products, the 2 tables are connected within the database. Now consider a situation, when the user comes for registering on the webpage for the 1st time, He/She enters the information to be registered(Firstname, lastname, email,etc). When I am trying to save this with hibernate, will it create an instance of all the tables connected to the user class and try to save the information(leaving info in Products as null) or something else? If yes, then how I can I separate it within database/program logic.
I hope I made the question atleast a bit clear. Thank you.