tenwit wrote:
If you just want these properties to be saved as distinct objects each time, make them a collection (probably a list): you'll then have a different row in the table for each "smart" in the system, for each "considerate", etc.
If you want to provide users with a list of all existing person-properties, in the hopes that they won't enter "clever" if "smart" is already in there, then you'll want a many-to-many mapping, with PersonProperty being its own class. You'll need to write business logic to ensure that PersonProperties are looked up before new Persons are saved; if the value isn't in the PersonProperty table then you'll want to add it and put the new object into the Person's list of PersonProperties. This solution ensures that there will only be one "smart" row in the PersonProperty table. Of course, it's up to to ensure that there are no rows like "Smart", "smart ", etc.
Either way, this isn't really a hibernate issue. Deisgn your solution as if you were using plain old JDBC (or even just SQL): whatever your solution, you'll be able to model it using hibernate.
Thanks tenwit for your input. I was trying to learn the Hibernate "language" for the case.