snpesnpe wrote:
I think that Sergey want simple many-to-one relationship
It is enough that declare many-to-one in USER for STATE (for example) and set
lazy to false.Hibernate will populate lookup automatic.
regards
Peco
Hi Peco, not quite. There are two problems here.
1. Select dropdown data from the lookup table
2. When dropdown value is selected on the webpage commit it to the database as part of User record.
Since, lookup table does not change I do not want to reload them every time. Also, I would like to avoid creating objects for lookup tables if possible. Collection of State Objects would be a waste, since all they would contain is a single string. I would like to be able to map User Object to USER and STATE_LIST tables at the same. I know it is not possilbe in Hibernate 2, but 3 allows one to many mapping between objects and tables.
Thanks,
Sergey