I am using Hibernate and I am facing with a really annoying problem, when i re- generated my Business Object and mapping files because a new property o structural change or something the old files are complete overwriting, then my validation, calculated properties, my personalization like EAGER or LAZY load and all my job in the old files are lost. There is anyways to solve this problem like merge generation, or like .net Partial class (one the generated code , the second one for my personalization)
Share
I usually put all custom code in sub-classes of the generated code to avoid that problem. You can also add Java code in the XML files and the generation process puts it in to the generated classes. IMO that’s a pain because you lose the advantages of coding in a Java-aware editor.