I want to store the data of my program via ORM and I'm separating each object nicely.
My User object, for example, has its basic attributes and is also composed of other objects such as Address, Contact and Access.
Each object has an ID attribute, for identification and association ...
My question is as follows, in the constructor method of each class (User, Address, Contact and Access) Should I pass the corresponding id or just the other attributes? Because I think, all of a sudden, hibernate can assign the correct ID.
Public Class Cliente
private long Id;
private String Nome;
Public Cliente(Long id,String Nome){}
'ou
Public Cliente(String Nome){}
'?