Hibernate: ManytoOne - how many object? -


i have database many object (for example "ad"), every ad belongs 1 "category". relationship manytoone. fetch ads , eager option in every ad reference category object. question is: if several ads same category, each category created unique object or references point 1 same object?

if ad1 , ad2 both belong same category c1 , loaded in same hibernate session, both have reference same category object c1.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -