I'm having a problem trying to map a persistent enumeration into a collection using Hibernate 2.1.7, and I haven't been able to find any examples that would help me out. Thought I'd ask about it here.
I have a class that represents a User and I need to associate with that user a collection of Privileges. The Privileges are currently defined as a persistent enumeration (using the UserType method) because it doesn't make sense to put them into a database table. So, I anticipate having a one-to-many relationship between User and Privilege, but when I try to generate the schema for my database there is no mapping for the Privilege object, so it fails to build the proper association. The table "UserPrivilege" should contain the User_id and the Privilege_id.
Any thoughts?
Thanks!
David
|