Hi, Max!
Now hibernate tools hbm file generation works as follows
1. Generate header
2. For each property
generate element
3. Close body.
All this file body generates to String.
If generation fails at step 2 then file will not be generated at all.
As hbm generation doesn't support many mappings (for example I didn't
see map.hbm.ftl, set can't be generated with element, etc.) I propose to
change generation algorithm as follows:
1. Generate header
2. For each property
try{
append(element generated string);
} catch exception{
append(<!-- Exception (exceptionName and message) occurred while
trying to generate this property-->);
append(<property name="propName" type="'type' if defined or
'string'"/>);
//or append(<!--property name="propName" type="type or string"/
-->);
}
3. Close body.
What is your opinion about this?
--
Best regards,
Dmitry Geraskov
dgeraskov(a)exadel.com
Senior Developer
Exadel Inc