Hibernate version: 2.1.7
we are using a database design tool (power designer actually) to generate schema ,and middlegen to generate hbm from the schema.We must keep the power designer file as a document, which is required by the management team, and need to deliver the reports generated by power designer to the customer.
We may alter the hbm to fit our needs, for example to map multiple class to single table and etc.
We feel pain when the schema changes: after add several fields in database, we will generate the hbm file again, so we can't keep our modification unchanged. Or, we have to modify the hbm file manually, which may intoduce errors, and it should be automatic.
I think, if we can split the information to 2 hbm, one for basic field mapping , one for further collection and class mapping, life will be much happier.
that means, when one field added, only the basic field mapping file will be generated, and since this is a full mapping , it can be automaticlly synchronized by some tool like middlegen or Hibernate Synchronizer. And we maintainence the collection mapping and class mapping manually.
Can it possible? Any suggustion is appreciated.
|