When I was asked in the interview how hibernate does one-to-many mapping, what did I want to ask?

in the interview the day before yesterday, the interviewer asked me how to do one-to-many mapping in hibernate, so I said how to configure it in the hbm file and add collection classes to entity classes as extended objects. In short, I answered the specific use of doing one-to-many mapping. But the interviewer"s expression and reaction don"t seem to be the answer he expected, so what exactly does the interviewer want to ask this question? Ask the boss for advice

Mar.31,2021

actually wants to ask you how to express one-to-many or many-to-one in entity class
entity class:
private Set < bean > beans = new hashSet < bean >; / / to express one-to-many relationship.
private Bean beans; / / means many-to-one
configuration files generally do not ask you

.
Menu