-->
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: DateCreated, DateModified columns how to?
PostPosted: Mon Sep 20, 2010 11:00 am 
Beginner
Beginner

Joined: Fri Dec 10, 2004 11:46 pm
Posts: 37
Using Hibernate 3.5.1 and MSSQL 2008 R2

Hi I'm trying to implement the typical DateCreated and DateModified columns. The issue I'm having is that the requirement is to get the date from the database not from the application.

For DateCreated I can set the property mapping to generated = always and set a the column default value in the DB to SQL GetDate()

But how do I go about it for DateModified? When I do an Update I would like the DateModified to be update with the DB time. Is it an SQL thing or a hibernate thing?


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.