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.  [ 3 posts ] 
Author Message
 Post subject: May I ask what's the defect of the timestamp tag?
PostPosted: Wed Aug 18, 2004 10:32 pm 
Beginner
Beginner

Joined: Thu Jul 22, 2004 4:32 am
Posts: 31
May I ask what's the defect of the timestamp tag?

Any suggestion will be appreciated!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 10:36 pm 
Beginner
Beginner

Joined: Thu Jul 22, 2004 4:32 am
Posts: 31
Code:
<timestamp column="modifyDate" name="modifyDate"/>


when I execute load(class,id) ,
this sql command will be executed:
Hibernate: update title set modifyDate=?, creator=?, modifier=? where titleId=? and modifyDate=?

who can tell me why???

and why creator and modifier will be updated? I haven't changed it at all.

Thanks a million!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 11:01 pm 
Beginner
Beginner

Joined: Thu Jul 22, 2004 4:32 am
Posts: 31
I have solved this problem, because I use char for creator in SQL Server,and string in this column will be filled with blankspace,and I white code with trim in my class
Code:
    public String getCreator() {
        if(creator!=null){
            return creator.trim();
        }else{
            return null;
        }
    }


and createDate was modified because creator was modified.

Thanks all the same!


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

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.