I'm using Hibernate version: 2.1.2. Here is my mapping:
Code:
<?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.fedex.fsme.model.Reference" table="referencetable" >
<id name="id" column="referencecode">
<generator class="identity"/>
</id>
<property name="name" column="referencename" type="java.lang.String" />
<property name="type" column="referencetype" type="java.lang.Character" />
</class>
</hibernate-mapping>
Here is the hibernate.properties I'm using:
Code:
hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N'
hibernate.query.imports net.sf.hibernate.test, net.sf.hibernate.eg
## Sybase Anywhere
hibernate.dialect net.sf.hibernate.dialect.SybaseAnywhereDialect
hibernate.connection.driver_class com.sybase.jdbc2.jdbc.SybDriver
hibernate.connection.username dba
hibernate.connection.password fsmanager
hibernate.connection.url jdbc:sybase:Tds:localhost:49152/fsme
#################################
### Hibernate Connection Pool ###
#################################
hibernate.connection.pool_size 1
hibernate.statement_cache.size 25
hibernate.show_sql true
hibernate.jdbc.batch_size 0
hibernate.jdbc.use_scrollable_resultset false
hibernate.jdbc.use_streams_for_binary true
And here is a segment of my logs:
Code:
Jun 3, 2004 10:43:57 AM net.sf.hibernate.connection.DriverManagerConnectionProvider closeConnection
FINEST: returning connection to pool, pool size: 1
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl afterTransactionCompletion
FINEST: transaction completion
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl <init>
FINE: opened session
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl find
FINEST: find: select reference from com.fedex.fsme.model.Reference reference order by reference.name
Jun 3, 2004 10:43:57 AM net.sf.hibernate.engine.QueryParameters traceParameters
FINEST: named parameters: {}
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl flushEverything
FINEST: flushing session
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl flushEntities
FINEST: Flushing entities and processing referenced collections
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl flushCollections
FINEST: Processing unreferenced collections
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl flushCollections
FINEST: Scheduling collection removes/(re)creates/updates
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl flushEverything
FINE: Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl flushEverything
FINE: Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl autoFlushIfRequired
FINEST: Dont need to execute flush
Jun 3, 2004 10:43:57 AM net.sf.hibernate.hql.QueryTranslator logQuery
FINE: HQL: select reference from com.fedex.fsme.model.Reference reference order by reference.name
Jun 3, 2004 10:43:57 AM net.sf.hibernate.hql.QueryTranslator logQuery
FINE: SQL: select reference0_.referencecode as referenc1_, reference0_.referencename as referenc2_, reference0_.referencetype as referenc3_ from referencetable reference0_ order by reference0_.referencename
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.BatcherImpl logOpenPreparedStatement
FINEST: about to open: 0 open PreparedStatements, 0 open ResultSets
Jun 3, 2004 10:43:57 AM net.sf.hibernate.connection.DriverManagerConnectionProvider getConnection
FINEST: total checked-out connections: 0
Jun 3, 2004 10:43:57 AM net.sf.hibernate.connection.DriverManagerConnectionProvider getConnection
FINEST: using pooled JDBC connection, pool size: 0
Hibernate: select reference0_.referencecode as referenc1_, reference0_.referencename as referenc2_, reference0_.referencetype as referenc3_ from referencetable reference0_ order by reference0_.referencename
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.BatcherImpl getPreparedStatement
FINE: select reference0_.referencecode as referenc1_, reference0_.referencename as referenc2_, reference0_.referencetype as referenc3_ from referencetable reference0_ order by reference0_.referencename
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.BatcherImpl getPreparedStatement
FINEST: preparing statement
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader doQuery
FINEST: processing result set
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '65657' as column: referenc1_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader getRow
FINE: result row: 65657
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader loadFromResultSet
FINEST: Initializing object from ResultSet: 65657
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader hydrate
FINEST: Hydrating entity: com.fedex.fsme.model.Reference#65657
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '000001-000580' as column: referenc2_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '1' as column: referenc3_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '65658' as column: referenc1_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader getRow
FINE: result row: 65658
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader loadFromResultSet
FINEST: Initializing object from ResultSet: 65658
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader hydrate
FINEST: Hydrating entity: com.fedex.fsme.model.Reference#65658
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '000001-000581' as column: referenc2_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '1' as column: referenc3_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '65659' as column: referenc1_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader getRow
FINE: result row: 65659
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader loadFromResultSet
FINEST: Initializing object from ResultSet: 65659
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader hydrate
FINEST: Hydrating entity: com.fedex.fsme.model.Reference#65659
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '000001-000588' as column: referenc2_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '1' as column: referenc3_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '65660' as column: referenc1_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader getRow
FINE: result row: 65660
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader loadFromResultSet
FINEST: Initializing object from ResultSet: 65660
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader hydrate
FINEST: Hydrating entity: com.fedex.fsme.model.Reference#65660
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '000001-000589' as column: referenc2_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '1' as column: referenc3_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '65661' as column: referenc1_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader getRow
FINE: result row: 65661
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader loadFromResultSet
FINEST: Initializing object from ResultSet: 65661
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader hydrate
FINEST: Hydrating entity: com.fedex.fsme.model.Reference#65661
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '000001-000599' as column: referenc2_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.type.NullableType nullSafeGet
FINEST: returning '1' as column: referenc3_
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader doQuery
FINEST: done processing result set (5 rows)
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.BatcherImpl logClosePreparedStatement
FINEST: done closing: 0 open PreparedStatements, 0 open ResultSets
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.BatcherImpl closePreparedStatement
FINEST: closing statement
Jun 3, 2004 10:43:57 AM net.sf.hibernate.loader.Loader doQuery
FINEST: total objects hydrated: 5
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: resolving associations for [com.fedex.fsme.model.Reference#65657]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: done materializing entity [com.fedex.fsme.model.Reference#65657]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl finalize
FINE: running Session.finalize()
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: resolving associations for [com.fedex.fsme.model.Reference#65658]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: done materializing entity [com.fedex.fsme.model.Reference#65658]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: resolving associations for [com.fedex.fsme.model.Reference#65659]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: done materializing entity [com.fedex.fsme.model.Reference#65659]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: resolving associations for [com.fedex.fsme.model.Reference#65660]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: done materializing entity [com.fedex.fsme.model.Reference#65660]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: resolving associations for [com.fedex.fsme.model.Reference#65661]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeEntity
FINE: done materializing entity [com.fedex.fsme.model.Reference#65661]
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl initializeNonLazyCollections
FINE: initializing non-lazy collections
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl close
FINEST: closing session
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl disconnect
FINE: disconnecting session
Jun 3, 2004 10:43:57 AM net.sf.hibernate.connection.DriverManagerConnectionProvider closeConnection
FINEST: returning connection to pool, pool size: 1
Jun 3, 2004 10:43:57 AM net.sf.hibernate.impl.SessionImpl afterTransactionCompletion
FINEST: transaction completion