-->
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: Set value for a table column
PostPosted: Fri Dec 18, 2009 4:57 am 
Newbie

Joined: Fri Mar 27, 2009 4:40 am
Posts: 4
Hi all,

I would like to set the value of a table column with the result of a query about other table. That is:

the hbm.xml file is like:

.................
<class name="......>
<id name="id" type="java.lang.Long" unsaved-value="null">
<column name="ID" sql-type="NUMBER(19)"/>
<generator class="native">
</generator>
</id>
.................
<property name="myProperty" type="long">
.................

when the row of my table is inserted, the value of myProperty is already saved with the result of a query (about other table) execution. The aim is to do this by configuration and not by java code.

Many thanks in advance


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.