From Oracle, I can run this query: UPDATE HOSTS SET TIME_STAMP = SYSTIMESTAMP;
TIME_STAMP field gets correctly updated with milliseconds.
So I'm not sure it an Oracle problem.
Here is the mapping:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Eforce.DOCSRunner.Component.Modules.Host,DOCSRunner.Component.Implement" table="HOSTS">
<cache usage="read-write"/>
<id name="Id" column="ID" type="Int32" unsaved-value="0">
<generator class="native">
<param name="sequence">HOSTS_GENERATOR</param>
</generator>
</id>
<timestamp name="Timestamp" column="`TIME_STAMP`"/>
<property name="Name" column="`NAME`" type="String" length="50" />
<property name="Port" column="`PORT`" type="Int32"/>
<property name="Address" column="`ADDRESS`" type="String" length="50" />
<property name="ProgIdPackager" column="`PROG_ID_PACKAGER`" type="String" length="50" />
<property name="ProgIdExecutor" column="`PROG_ID_EXECUTOR`" type="String" length="50" />
<property name="Service" column="`SERVICE`" type="String" length="50" />
<many-to-one name="Module" column="`MODULE`" class="Eforce.DOCSRunner.Component.Modules.Module,DOCSRunner.Component.Implement" cascade="none"/>
<property name="Disabled" column="`DISABLED`" type="Boolean" />
</class>
</hibernate-mapping>
Here is the log from NHibernate:
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Impl.BatcherImpl - Building an IDbCommand object for the SqlString: INSERT INTO HOSTS ("PROG_ID_EXECUTOR", "TIME_STAMP", "PROG_ID_PACKAGER", "PORT", "DISABLED", "ADDRESS", "NAME", "SERVICE", "MODULE", ID) VALUES (:"PROG_ID_EXECUTOR", :"TIME_STAMP", :"PROG_ID_PACKAGER", :"PORT", :"DISABLED", :"ADDRESS", :"NAME", :"SERVICE", :"MODULE", :ID)
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Persister.EntityPersister - Dehydrating entity: [Eforce.DOCSRunner.Component.Modules.Host#2]
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.StringType - binding null to parameter: 0
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.TimestampType - binding '9:15 AM' to parameter: 1
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.StringType - binding null to parameter: 2
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.Int32Type - binding '8203' to parameter: 3
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.BooleanType - binding 'False' to parameter: 4
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.StringType - binding 'HTTP://SKIPPER-MASTER:8203/DBSynchro' to parameter: 5
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.StringType - binding 'SKIPPER-MASTER' to parameter: 6
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.StringType - binding 'JobDBSynchro' to parameter: 7
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.Int32Type - binding '2' to parameter: 8
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Type.Int32Type - binding '2' to parameter: 9
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - INSERT INTO HOSTS ("PROG_ID_EXECUTOR", "TIME_STAMP", "PROG_ID_PACKAGER", "PORT", "DISABLED", "ADDRESS", "NAME", "SERVICE", "MODULE", ID) VALUES (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9)
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p0 = ''
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p1 = '5/14/2006 9:15:02 AM'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p2 = ''
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p3 = '8203'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p4 = 'False'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p5 = 'HTTP://SKIPPER-MASTER:8203/DBSynchro'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p6 = 'SKIPPER-MASTER'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p7 = 'JobDBSynchro'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p8 = '2'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.SQL - :p9 = '2'
2006-05-14 09:15:02,071 [4920] DEBUG NHibernate.Impl.BatcherImpl - Closed IDbCommand, open IDbCommands :0
I have also tested with second cache level disabled.
Thanks.
|