Originally posted by Jami Kapla:
Unfortunately the <meta attribute="class-code"
produced no discernable difference from hbm2java.
It is supposed to place the code included in the <meta> element into the generated class. I think it must work.
As far as the first suggestion I guess I don't understand what it is you mean, as it is an int not sure what the java default is for that.
Java int default value is 0. So if you set this value for the unsaved-value, there will be no more need for tricks.
But nonetheless the whole reason I need to do this is to get it to work with a pre-existing framework that expects unsaved POJO's to have a identifier of -1(int)
If none of the above does not work you can always go to AOP (AspectJ, Aspectwerkz) and solve it (even if in this case I don't recommend it being in this case a hack :-( )
/pope