I must develop an application that uses a un DB, and that is structured in this mode:
1) there are metadata tables(Document Type, Document Attributes...) 2) starting from Metadata Tables are created/modified (also during the normal application- lifecycle at runtime) metadata tables.
IE: If I create a new Document Type, inserting a new record in the METADATA table named "Document Type" (Contract, Invoice, Note..), the new relative DATA table is created into the DB. This table has as columns the attributes that I have definited in the other METADATA table (Document Attributes).
I'd like to use an ORM in order to map the METADATA Tables because these not change the structure at runtime. Is it possible to map also the DATA Tables? I'd like to work with POJO also for the Data tables.
I think that is not possible to create classes at runtime (with reflection is possible, but is the best choiche?) and modyfy theyr structure.
This is probably the logic/problem used from CMS and CRM.
Have you some suggests Have you any suggestions on how to structure my application, especially for the ORM / DB?
Thank you
|