I' just starting out along the Hibernate path and I have a question/problem with unsderstanding the best or correct way to map data and objects. At a simple level, assume I have a user and userType object as below;
the code spippet for adding a user whould be;
Which I want represented in the Database as below;
The problem is I have is; I want the userTypes table to be static data only, that is I don't want hibernate to perform any CRUD operations on it. Where as in the above example I really only want hibernate to return user with a correctly populated userType object when queried and nothing else.
Am I approaching the problem the wrong way on trying to user hibernate incorrectly?