These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How can I set update to false for a component's property ?
PostPosted: Mon Dec 13, 2004 7:04 am 
Newbie

Joined: Mon Sep 01, 2003 10:40 am
Posts: 17
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.