Here are attatchments:
01. HBM file ::
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO"
table="WPReply">
<id column="wpreplyIdentifier" name="id">
<generator class="native">
<param name="sequence">wpreplyid_sequence</param>
</generator>
</id>
<version name="versionNumber"/>
<property name="creationDate"/>
<property name="status"/>
<property name="creationTime"/>
<property name="department"/>
<property name="ward"/>
<property name="physician"/>
<property name="patientId"/>
<property name="patientName"/>
<property name="bedRoom"/>
<property name="departmentId"/>
<property name="wardId"/>
<property name="physicianId"/>
<property name="callId"/>
<property name="delay"/>
</class>
</hibernate-mapping>
Here WPReplyDTO extends a class named PersistentCapableDTO which contains the id field of Long type. Things are working nice for all other dtos of my application.
02. JDBC driver I am using is Oracle 9i Thin driver.Are OCI drivers better option?Can driver be the culprits....What I am seeing is Hibernate is producing Id properly....
03. Hibernate log file is very smooth in generating the Id......
05 Jan 2005 09:56:27 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- about to open: 0 open PreparedStatements, 0 open ResultSets
05 Jan 2005 09:56:27 -- net.sf.hibernate.SQL -- DEBUG -- insert into WPReply(versionNumber, creationDate, status, creationTime, department, ward, physician, patientId, patientName, bedRoom, departmentId, wardId, physicianId, callId, delay, wpreplyIdentifier) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
05 Jan 2005 09:56:27 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- preparing statement
05 Jan 2005 09:56:27 -- net.sf.hibernate.persister.EntityPersister -- DEBUG -- Dehydrating entity: [com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#41]
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.IntegerType -- DEBUG -- binding '0' to parameter: 1
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.CalendarType -- DEBUG -- binding '2005-01-05 00:00:00' to parameter: 2
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.IntegerType -- DEBUG -- binding '1' to parameter: 3
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.CalendarType -- DEBUG -- binding '2005-01-05 00:00:00' to parameter: 4
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'Cardiology' to parameter: 5
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'CardiologyWard' to parameter: 6
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'Omar Gani' to parameter: 7
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 8
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding 'Md. Safiqul Islam' to parameter: 9
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.StringType -- DEBUG -- binding '' to parameter: 10
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 11
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 12
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '1' to parameter: 13
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '12' to parameter: 14
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.CalendarType -- DEBUG -- binding '1970-01-01 00:00:12' to parameter: 15
05 Jan 2005 09:56:27 -- net.sf.hibernate.type.LongType -- DEBUG -- binding '41' to parameter: 16
04. Then in the finding operation I am getting :
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- opened session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- find: select searchItem from searchItem in class com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO where searchItem.id != ?
05 Jan 2005 09:59:22 -- net.sf.hibernate.engine.QueryParameters -- DEBUG -- parameters: [0]
05 Jan 2005 09:59:22 -- net.sf.hibernate.engine.QueryParameters -- DEBUG -- named parameters: {}
05 Jan 2005 09:59:22 -- net.sf.hibernate.hql.QueryTranslator -- DEBUG -- compiling query
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- flushing session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushing entities and processing referenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Processing unreferenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Scheduling collection removes/(re)creates/updates
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Dont need to execute flush
05 Jan 2005 09:59:22 -- net.sf.hibernate.hql.QueryTranslator -- DEBUG -- HQL: select searchItem from searchItem in class com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO where searchItem.id != ?
05 Jan 2005 09:59:22 -- net.sf.hibernate.hql.QueryTranslator -- DEBUG -- SQL: select searchItem.wpreplyIdentifier as wpreplyI1_, searchItem.versionNumber as versionN2_, searchItem.creationDate as creation3_, searchItem.status as status, searchItem.creationTime as creation5_, searchItem.department as department, searchItem.ward as ward, searchItem.physician as physician, searchItem.patientId as patientId, searchItem.patientName as patient10_, searchItem.bedRoom as bedRoom, searchItem.departmentId as departm12_, searchItem.wardId as wardId, searchItem.physicianId as physici14_, searchItem.callId as callId, searchItem.delay as delay from WPReply searchItem where (searchItem.wpreplyIdentifier!=? )
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- about to open: 0 open PreparedStatements, 0 open ResultSets
05 Jan 2005 09:59:22 -- net.sf.hibernate.SQL -- DEBUG -- select searchItem.wpreplyIdentifier as wpreplyI1_, searchItem.versionNumber as versionN2_, searchItem.creationDate as creation3_, searchItem.status as status, searchItem.creationTime as creation5_, searchItem.department as department, searchItem.ward as ward, searchItem.physician as physician, searchItem.patientId as patientId, searchItem.patientName as patient10_, searchItem.bedRoom as bedRoom, searchItem.departmentId as departm12_, searchItem.wardId as wardId, searchItem.physicianId as physici14_, searchItem.callId as callId, searchItem.delay as delay from WPReply searchItem where (searchItem.wpreplyIdentifier!=? )
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- preparing statement
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.IntegerType -- DEBUG -- binding '0' to parameter: 1
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- running Session.finalize()
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- processing result set
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '0' as column: wpreplyI1_
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- result row: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- Initializing object from ResultSet: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- Hydrating entity: com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#0
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.IntegerType -- DEBUG -- returning '0' as column: versionN2_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.CalendarType -- DEBUG -- returning '2005-01-05 00:00:00' as column: creation3_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.IntegerType -- DEBUG -- returning '1' as column: status
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.CalendarType -- DEBUG -- returning '2005-01-05 00:00:00' as column: creation5_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'Cardiology' as column: department
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'CardiologyWard' as column: ward
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'Omar Gani' as column: physician
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: patientId
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning 'Md. Safiqul Islam' as column: patient10_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.StringType -- DEBUG -- returning null as column: bedRoom
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: departm12_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: wardId
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '1' as column: physici14_
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '10' as column: callId
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.CalendarType -- DEBUG -- returning '1970-01-01 00:00:12' as column: delay
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Version: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '0' as column: wpreplyI1_
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- result row: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.type.LongType -- DEBUG -- returning '0' as column: wpreplyI1_
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- result row: 0
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- done processing result set (3 rows)
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- done closing: 0 open PreparedStatements, 0 open ResultSets
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.BatcherImpl -- DEBUG -- closing statement
05 Jan 2005 09:59:22 -- net.sf.hibernate.loader.Loader -- DEBUG -- total objects hydrated: 1
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- resolving associations for [com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#0]
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- done materializing entity [com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO#0]
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- initializing non-lazy collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- flushing session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushing entities and processing referenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Processing unreferenced collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Scheduling collection removes/(re)creates/updates
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.Printer -- DEBUG -- listing entities:
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.Printer -- DEBUG -- com.sikraft.ihis.wardadministration.physicianreply.WPReplyDTO{creationTime=2005-01-05 00:00:00, physician=Omar Gani, callId=10, creationDate=2005-01-05 00:00:00, status=1, physicianId=1, id=0, ward=CardiologyWard, department=Cardiology, departmentId=1, wardId=1, patientName=Md. Safiqul Islam, bedRoom=null, patientId=1, delay=1970-01-01 00:00:12, versionNumber=0}
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- executing flush
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- post flush
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- closing session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- disconnecting session
05 Jan 2005 09:59:22 -- net.sf.hibernate.impl.SessionImpl -- DEBUG -- transaction completion
05. And in the database I am seeing the id value 1.5000E-81
Regards,
Murad
|