Hello,
I apologize if this has already been asked, but I haven't been able to find anything here or in the documentation.
Here is my issue. I've got a SystemPreferences class which just has a bunch of getters and setters for the different preferences which can be set. I'd like to map this onto a two column database table: first column would contain the preference's name, the second would contain the preferences value. I'd like to map it this way for two reasons: 1) It avoids a table with a single row and 2) it makes adding new preferences easier since I don't need to modify the table structure to do it. It woul d seem that mapping this class as a <map> would be the right thing to do, but, from what I can see, you can't do that to an entity and the entity has no <id> which is required. I also can't use a UserType for the same reason. So, is this something I can accomplish using Hibernate or should I just use raw JDBC to handle this one case? If it is worth doing in Hibernate, can someone point me in the correct direction for how I would map this?
Thanks,
--Chris
|