Hibernate version: 2.1
Name and version of the database you are using: Oracle 9i
I am still in the beginning stages of mapping my legacy database to Hibernate. I have mapped most of the important concrete tables in the schema but I have a requirement (that apparently others on the forum have as well) for dynamic components. I have read Hibernate in Action but sadly dynamic-components must have came out after the book was published.
In short, my DB schema gets shipped with my product, and then the customers, using my product, create new tables to hold information specific to their needs. In the process, I keep the table name, column name, and column type for each entry. If I understand dynamic-components correctly, you would have to add all the property names/types at runtime or configuration of the SessionFactory in order to access these tables that were created. Is that correct?
If so, what is the best practice for doing this. I have anywhere from 10 to 500 tables that get created by customers during the lifetime of the product. Should I only add properties to the dynamic components as they are needed, or do I load all of them at startup. I am very confused on this topic, so any help, examples, experience would be most appreciated.
|