I have a table USER. A USER can have many possible types. These possible types are in a lookup table USER_TYPE I would like to keep that association in Hibernate by creating a Hibernate POJO for USER_TYPE. But the problem is that whenevre the there is an access to either:
the getType() of the User object or
the equals and hashcode methods (type is a property of the user which uniquely defines it)
There is a SQL generated to access the DB. IS there any way to avoid/cache this since this information (the UserType) always has the same values
Hibernate version: 3.0
Mapping documents:Code between sessionFactory.openSession() and session.close():Full stack trace of any exception that occurs:Name and version of the database you are using:The generated SQL (show_sql=true):Debug level Hibernate log excerpt:Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html