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: Mapping with Timestamp. Miliseconds not persisted.
PostPosted: Wed Oct 28, 2009 3:22 pm 
Newbie

Joined: Wed Oct 28, 2009 3:09 pm
Posts: 1
Hi everybody, how are you?
I'm here using nhibernate with C# and OracleServer Express.
I mapped a class but it is not persisting the miliseconds, i'm using oracle timestamp and nhibernate timestamp, but debbugging i saw that the generated sql
clause is passing the date without the miliseconds.
Anybody saw this type of situation? Any ideia that maybe help?
Below there is the description of the class properties, the table and the hbm mapping.

Thanks in advance for any answer.

-Class Properties --------------------------------------------------
int ID;
int Other;
DateTime TheTime;

-Table------------------------------------------------------------
CREATE TABLE "TESTTABLE"
(
"ID" NUMBER(10,0) NOT NULL ENABLE,
"OTHER" NUMBER(10,0) NOT NULL ENABLE,
"THETIME" TIMESTAMP(6) NOT NULL ENABLE
)

-HBM Mapping------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="X" assembly="X">
<class name="test" table="TESTTABLE" lazy="false">
<id name="ID" column="ID" unsaved-value="-1">
<generator class="assigned"/>
</id>
<property name="Other" column ="OTHER" type="Int32" not-null="true"/>
<property name="TheTime" column ="THETIME" type="Timestamp" not-null="true"/>
</class>
</hibernate-mapping>
---------------------------------------------------------------------------------------


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.