hello,
I am running Oracle 8.1.7, Hibernate 3.0 and Middlegen from CVS with version="3.0" attribute in the hibernate sub-task in ant.
In the Middlegen GUI, I uncheck the mutable checkbox. Middlegen produces the following mapping:
Code:
<class
name="com.acme.ge.generated.ComponentPowerLimit"
table="COMPONENT_POWER_LIMITS"
mutable="false"
lazy="false"
>
But even though mutable is set to false, hbm2java generates setters for my POJOs.
I found a workaround in another thread (
http://forum.hibernate.org/viewtopic.php?t=948288), which says that <meta attribute="scope-set">private</meta> should do the thing. This is ok, but I wonder why Middlegen is producing mutable=false, when it doesn't really have an impact!? Is there any way to use Middlegen and still end up with unmutable POJOs in the end?
cheers,
pj