I have a system where i have a number of well defined tables that are mapped to hibernate normally through their interfaces. All of this works just fine. However, what I want to do is add the capability for users to define new tables with a web based interface. The user would connect to the ad-hoc data part of the web application and define new types of items. For example I might define a Customer item as having a name and phone number. Then the engine would create a database table for that type of data and then allow the user to create new records, view the records and so on. Essentially I want the user to be able to create tables on the fly and use them.
Is there any way I can do this easily with hibernate. I dont want to do on the fly byte code generation as that seems heavyweight but I would like to use HQL to access the user defined tables.
Any ideas?
|