Hibernate reverse engineering
Posted
by EugeneP
on Stack Overflow
See other posts from Stack Overflow
or by EugeneP
Published on 2010-03-10T12:22:42Z
Indexed on
2010/05/02
17:17 UTC
Read the original article
Hit count: 170
I have a structure where the main table is USER, other tables include CATEGORY (contains user_id).
What I got after the standard reverse engineering procedure was:
- the class User contained a collection of categories,
- the class Category didn't contain the foreign key (user_id) but it did contain the User object.
Why did it not contain the foreign key as a class property?
And how do I join these two tables in HQL without that glue? HQL - please explain this part.
© Stack Overflow or respective owner