Hibernate Tools 3.1.0 beta4
When I use hibernatetool hbm2java to generate my java code, I have two differences from when I used hbm2java from hibernate 2.1.8.
I want to know if a) there is a way to get my desired behavior b) these are bugs or c) there is a reason this functionality no longer exists.
1) I have a component with a <parent name="o"/>, in hibernate 2 hbm2java would generate code with a parent node:
Hibernate 2.1.8 hbm2java generation
Code:
/** nullable persistent field */
private String s;
/** nullable persistent field */
private OwningNode o;
/** full constructor */
public Gen(String s, OwningNode o) {
this.s= s;
this.o= o;
}
Hibernate 3.1.0 beta4 hbm2java generation
Code:
// Fields
private String textString;
// Constructors
/** full constructor */
public Gen(String s) {
this.s= s;
}
So the owning node is not part of the generated component.
2) In hibernate 2.1.8 if I had a property that was a formula, it was NOT part of the generated full constructor. However, in 3.1.0 beta4 the formula is part of the constructor.
Code:
<property name="count" type="long" formula="(select count(*) from TABLE">
inherit="false">private</meta>
</property>
Is there any way to stop these from being in the full constructor?
Thanks