-->
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 timestamp value in hbm file?
PostPosted: Tue Sep 21, 2010 4:32 pm 
Newbie

Joined: Wed Aug 25, 2010 2:06 pm
Posts: 4
Hi,,

I have a .hbm.xml file, where you will the primary key (id field) is a timestamp field:

<hibernate-mapping>
<class
name="com.example.MsgsRcv"
table="MRS_MSGS_RCV"
dynamic-insert="true" dynamic-update="true"
>

<id
name="tsMsgRcvd"
type="java.sql.Timestamp"
column ="TS_MSG_RCVD" >
<generator class="assigned" />
</id>


<property
name="msgLength"
type="java.math.BigDecimal"
column="MSG_LENGTH"
not-null="true"
length="22"
/>
...
</class>
</hibernate-mapping>

The POJO contains:
private Timestamp tsMsgRcvd;

Can you suggest to me how to do an insert that achieves microsecond level precision in the timestamp value?

Cheers


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.