I use in the Hibernate project. I read how to work with collections, but something is not clear:
There is information on how to work and what to write for the collection in the xml-file that describes the class. But what table should correspond to this class?
For example, a class with three fields
int id; int и ArrayList<Person> persons;
int id; int и ArrayList<Person> persons;What should the table look like for such a class (no matter which database)? And if you can xml-file? I know about getters, setters and stand designs.
And at the expense of my simple classes, I correctly understand - it is enough to create a label with the same fields as our class variables that we want to save, describe it, and continue to write functions in order to drag from the database and write?
And another question, for example, I save in one class such
ArrayList<Person> persons;- does this mean that in the Person class all the variables must also be Getters, Setters, and so on?