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:
- the User class contains a set of categories,
- the class category did not contain a foreign key (user_id), but contained a User object.
Why doesn't it contain a foreign key as a property of a class?
And how can I join these two tables in HQL without this glue? HQL - please explain this part.
source
share