I have an application where an administrative user can create custom-defined entities in the database. Creating an entity involves defining the columns for the entity and storing the definition in the database. A table is created based on the definition to persist instances of the entity. Entities always have an id column as a primary key and a date column to indicate when the data was saved.
Is there a way to dynamically map Hibernate to these custom-defined entities, since they do not exist at deployment? I have searched high and low through the documentation, forum, and FAQs with no luck. I have found documentation that mentions using Dynabeans along with references to runtime mapping, but it is not clear from how this might be implemented.
Does anyone have insight as to if this can be done and how? If they can't be dynamically mapped, what is the appropriate way to take advantage of Hibernate's capabilities in this scenario? Examples would be greatly appreciated.
Thanks!
|