hibernate 2.05:
Mapping documents:
<class name="MyBillingClass" table="mytable">
<composite-id name="id" class="PkMyClass">
<key-property name="id" type="integer" column="ID" />
<key-property name="id2" type="java.lang.Integer" column="ID_TABLE2" />
</composite-id>
<component name="userEditated" class="MyUserClass" >
<property name="userInsert" type="string" column="USER_INSERT" update=false /> <!-- update=false ingnored. why? -->
<property name="dateInsert" type="date" column="DATE_INSERT" update=false /> <!-- update=false ingnored. why? -->
<property name="userUpdate" type="string" column="USER_UPDATE" />
<property name="dateUpdate" type="date" column="DATE_UPDATE" />
</component>
....
I want set update to false for a component property, but this future ins't supported by Hibernate.
(
from hibernate-mapping-2.0.dtd:
Code:
<!ELEMENT property (meta*,column*)>
<!ATTLIST property update (true|false) "true"> <!-- only supported for properties of a class (not component) -->
)
I seen that into EntityPersister source code class there is this line
Code:
if ( prop.isUpdateable() ) foundColumn=true;
but I don't understand becouse this don't work for components.
Any suggestions?