-->
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: Defining Timestamp Element For More than one column
PostPosted: Mon Aug 03, 2009 7:54 am 
Newbie

Joined: Mon Aug 03, 2009 7:45 am
Posts: 1
hi

I have some timestamp columns in the database table I'm trying to insert db generated date in those field but I realized that you can only configure one column using timestamp for current timestamp generation ..is there any other way?

More details of the problem :-

<timestamp name="modifiedOnDt" column="MODIFIED_ON_DT" source="db" generated="always" ></timestamp>

<property name="createdOnDt" type="timestamp" generated="never" insert="false" update="false" optimistic-lock="true">
<column name="CREATED_ON_DT" length="10">
<comment>Created By Employee ID</comment>
</column>
</property>


<!--
<property name="modifiedOnDt" type="timestamp" insert="false" update="true" not-null="false" >
<column name="MODIFIED_ON_DT" length="10">
<comment>Last Modified By Employee ID</comment>
</column>
</property>
-->

I'm trying to insert default value in createdondate column and configuring the modifyondate column using timestamp
the logic behind this is that createdondate and modifedondate should be same at insertion and modifedondate should gate update as per the current timestamp values on the consecative updates.. anybody has any solution for this problem


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.