I am working on a project where we are using the *.hbm.xml as the basis for both generating the classes and the schema and we have hit a point where we really want to add behavior to the generated (persistent) classes.
Is there a best practice for this that either allows us to save modifications to the generated classes or to somehow use one class mapping at class generation time and another (the subclass with added behavior) at run time?
Since we have not yet solidified the object model, we don't want to blindly edit the generated classes.
Alternately, should we dump the *.hbm.xml-centric approach and move to generating that file from the java class?
Thanks
|