Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hi,
I am trying with a very simple one-to-many relationship. When I am storing the objects, there are no problems. But when I am trying to read out the collection, it says invalid descriptor index. Please help.
Regards,
Hibernate version:
hibernate-3.1rc2
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="Parent">
<id name="id">
<generator class="identity"/>
</id>
<set name="children">
<key column="parent_id"/>
<one-to-many class="Child"/>
</set>
</class>
<class name="Child">
<id name="id">
<generator class="identity"/>
</id>
<property name="name"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
The Parent class:
public class Parent
{
private Long id ;
private Set children;
Parent(){}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id=id;
}
public Set getChildren()
{
return children;
}
public void setChildren(Set children)
{
this.children=children;
}
}
_____________________________________________________________
The Child class:
public class Child
{
private Long id;
private String name;
Child(){}
public Long getId()
{
return id;
}
private void setId(Long id)
{
this.id=id;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name=name;
}
}
_____________________________________________________________
The Main class:
public class PCManager
{
public static void main(String[] args)
{
PCManager mgr = new PCManager();
List lt = null;
if (args[0].equals("store"))
{
mgr.createAndStoreParent(new HashSet(3));
}
else if (args[0].equals("list"))
{
mgr.listEvents();
}
HibernateUtil.getSessionFactory().close();
}
private void createAndStoreParent(HashSet s)
{
HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction();
Parent p1 = new Parent();
int size = 3;
for (int i=size; i>0; i--)
{
Child c = new Child();
c.setName("Child"+i);
s.add(c);
}
p1.setChildren (s);
Iterator elems = s.iterator();
do {
Child ch = (Child) elems.next();
HibernateUtil.getSessionFactory().getCurrentSession().save(ch);
}while(elems.hasNext());
HibernateUtil.getSessionFactory().getCurrentSession().save(p1);
HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().commit();
}
private void listEvents()
{
HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction();
Parent result = (Parent) HibernateUtil.getSessionFactory().getCurrentSession().load(Parent.class, new Long(1));
System.out.println("Id is :"+ result.getId());
Set children = result.getChildren();
Iterator elems = children.iterator();
do {
Child ch = (Child) elems.next();
System.out.println("Child Name"+ ch.getName());
}while(elems.hasNext());
HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().commit();
}
}
Full stack trace of any exception that occurs:
When I run with "hbm2ddl.auto" property as validate and trying to list the contents, I get the following out put.
C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc2\MyHibernate>ant run -Da
ction=list
Buildfile: build.xml
clean:
[delete] Deleting directory C:\Documents and Settings\mirza\Desktop\hibernate
-3.1rc2\MyHibernate\bin
[mkdir] Created dir: C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc
2\MyHibernate\bin
copy-resources:
[copy] Copying 4 files to C:\Documents and Settings\mirza\Desktop\hibernate
-3.1rc2\MyHibernate\bin
compile:
[javac] Compiling 5 source files to C:\Documents and Settings\mirza\Desktop\
hibernate-3.1rc2\MyHibernate\bin
run:
[java] 09:09:23,433 INFO Environment:474 - Hibernate 3.1 rc2
[java] 09:09:23,449 INFO Environment:489 - loaded properties from resource
hibernate.properties: {hibernate.cglib.use_reflection_optimizer=true, hibernate
.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dial
ect=org.hibernate.dialect.SQLServerDialect, hibernate.max_fetch_depth=1, hiberna
te.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.
substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.cac
he.region_prefix=hibernate.test, hibernate.jdbc.batch_versioned_data=true, hiber
nate.connection.pool_size=1}
[java] 09:09:23,465 INFO Environment:519 - using java.io streams to persis
t binary types
[java] 09:09:23,465 INFO Environment:520 - using CGLIB reflection optimize
r
[java] 09:09:23,481 INFO Environment:550 - using JDK 1.4 java.sql.Timestam
p handling
[java] 09:09:23,559 INFO Configuration:1257 - configuring from resource: /
hibernate.cfg.xml
[java] 09:09:23,559 INFO Configuration:1234 - Configuration resource: /hib
ernate.cfg.xml
[java] 09:09:23,872 INFO Configuration:460 - Reading mappings from resourc
e: PCMapping.hbm.xml
[java] 09:09:24,013 INFO HbmBinder:266 - Mapping class: Parent -> Parent
[java] 09:09:24,045 INFO HbmBinder:266 - Mapping class: Child -> Child
[java] 09:09:24,045 INFO Configuration:1368 - Configured SessionFactory: n
ull
[java] 09:09:24,061 INFO Configuration:1014 - processing extends queue
[java] 09:09:24,061 INFO Configuration:1018 - processing collection mappin
gs
[java] 09:09:24,061 INFO HbmBinder:2233 - Mapping collection: Parent.child
ren -> Child
[java] 09:09:24,076 INFO Configuration:1027 - processing association prope
rty references
[java] 09:09:24,076 INFO Configuration:1049 - processing foreign key const
raints
[java] 09:09:24,155 INFO DriverManagerConnectionProvider:41 - Using Hibern
ate built-in connection pool (not for production use!)
[java] 09:09:24,170 INFO DriverManagerConnectionProvider:42 - Hibernate co
nnection pool size: 1
[java] 09:09:24,170 INFO DriverManagerConnectionProvider:45 - autocommit m
ode: false
[java] 09:09:24,170 INFO DriverManagerConnectionProvider:80 - using driver
: sun.jdbc.odbc.JdbcOdbcDriver at URL: jdbc:odbc:MySQL
[java] 09:09:24,170 INFO DriverManagerConnectionProvider:86 - connection p
roperties: {}
[java] 09:09:24,264 INFO SettingsFactory:77 - RDBMS: Microsoft SQL Server,
version: 08.00.0194
[java] 09:09:24,264 INFO SettingsFactory:78 - JDBC driver: JDBC-ODBC Bridg
e (SQLSRV32.DLL), version: 2.0001 (03.85.1117)
[java] 09:09:24,296 INFO Dialect:100 - Using dialect: org.hibernate.dialec
t.SQLServerDialect
[java] 09:09:24,311 INFO TransactionFactoryFactory:31 - Using default tran
saction strategy (direct JDBC transactions)
[java] 09:09:24,327 INFO TransactionManagerLookupFactory:33 - No Transacti
onManagerLookup configured (in JTA environment, use of read-write or transaction
al second-level cache is not recommended)
[java] 09:09:24,327 INFO SettingsFactory:125 - Automatic flush during befo
reCompletion(): disabled
[java] 09:09:24,327 INFO SettingsFactory:129 - Automatic session close at
end of transaction: disabled
[java] 09:09:24,343 INFO SettingsFactory:144 - Scrollable result sets: ena
bled
[java] 09:09:24,343 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): d
isabled
[java] 09:09:24,343 INFO SettingsFactory:160 - Connection release mode: au
to
[java] 09:09:24,358 INFO SettingsFactory:184 - Maximum outer join fetch de
pth: 1
[java] 09:09:24,358 INFO SettingsFactory:187 - Default batch fetch size: 1
[java] 09:09:24,358 INFO SettingsFactory:191 - Generate SQL with comments:
disabled
[java] 09:09:24,358 INFO SettingsFactory:195 - Order SQL updates by primar
y key: disabled
[java] 09:09:24,358 INFO SettingsFactory:338 - Query translator: org.hiber
nate.hql.ast.ASTQueryTranslatorFactory
[java] 09:09:24,374 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTran
slatorFactory
[java] 09:09:24,374 INFO SettingsFactory:203 - Query language substitution
s: {no='N', yes='Y'}
[java] 09:09:24,374 INFO SettingsFactory:209 - Second-level cache: enabled
[java] 09:09:24,374 INFO SettingsFactory:213 - Query cache: disabled
[java] 09:09:24,374 INFO SettingsFactory:325 - Cache provider: org.hiberna
te.cache.HashtableCacheProvider
[java] 09:09:24,374 INFO SettingsFactory:228 - Optimize cache for minimal
puts: disabled
[java] 09:09:24,374 INFO SettingsFactory:233 - Cache region prefix: hibern
ate.test
[java] 09:09:24,405 INFO SettingsFactory:237 - Structured second-level cac
he entries: disabled
[java] 09:09:24,437 INFO SettingsFactory:257 - Echoing all SQL to stdout
[java] 09:09:24,452 INFO SettingsFactory:264 - Statistics: disabled
[java] 09:09:24,452 INFO SettingsFactory:268 - Deleted entity synthetic id
entifier rollback: disabled
[java] 09:09:24,452 INFO SettingsFactory:283 - Default entity-mode: POJO
[java] 09:09:24,593 INFO SessionFactoryImpl:155 - building session factory
[java] 09:09:24,938 INFO SessionFactoryObjectFactory:82 - Not binding fact
ory to JNDI, no JNDI name configured
[java] 09:09:24,954 INFO SchemaValidator:99 - Running schema validator
[java] 09:09:24,954 INFO SchemaValidator:107 - fetching database metadata
[java] 09:09:24,954 INFO Configuration:1014 - processing extends queue
[java] 09:09:24,954 INFO Configuration:1018 - processing collection mappin
gs
[java] 09:09:24,954 INFO Configuration:1027 - processing association prope
rty references
[java] 09:09:24,954 INFO Configuration:1049 - processing foreign key const
raints
[java] 09:09:24,985 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState
: S1002
[java] 09:09:24,985 ERROR JDBCExceptionReporter:72 - [Microsoft][ODBC SQL S
erver Driver]Invalid Descriptor Index
[java] 09:09:25,001 ERROR SchemaValidator:129 - Error closing connection
[java] java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid transaction state
[java] Initial SessionFactory creation failed.org.hibernate.exception.Gener
icJDBCException: could not get table metadata: Child
[java] java.lang.ExceptionInInitializerError
[java] at HibernateUtil.<clinit>(Unknown Source)
[java] at PCManager.listEvents(Unknown Source)
[java] at PCManager.main(Unknown Source)
[java] Caused by: org.hibernate.exception.GenericJDBCException: could not g
et table metadata: Child
[java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificE
xception(SQLStateConverter.java:91)
[java] at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
[java] at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
[java] at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2988)
[java] at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:9
80)
[java] at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.jav
a:739)
[java] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaVal
idator.java:125)
[java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm
pl.java:299)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
tion.java:1145)
[java] at HibernateUtil.<clinit>(Unknown Source)
[java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateCon
verter.java:79)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExcep
tionHelper.java:43)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExcep
tionHelper.java:29)
[java] at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(
DatabaseMetadata.java:100)
[java] at org.hibernate.cfg.Configuration.validateSchema(Configuration.
java:946)
[java] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaVal
idator.java:116)
[java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm
pl.java:299)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
tion.java:1145)
[java] ... 3 more
[java] Caused by: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver
]Invalid Descriptor Index
[java] at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
[java] at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
[java] at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3862)
[java] at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultS
et.java:5561)
[java] at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.j
ava:338)
[java] at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.j
ava:395)
[java] at PCManager.listEvents(Unknown Source)
[java] at PCManager.main(Unknown Source)
[java] at org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata
.java:30)
[java] at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(
DatabaseMetadata.java:85)
[java] ... 7 more
[java] Exception in thread "main"
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 4 seconds
Name and version of the database you are using:
Microsoft SQLServer2000
The generated SQL (show_sql=true):
When the program is run with "hbm2ddl.auto" property as create, I get the following output.
C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc2\MyHibernate>ant run -Daction=store
Buildfile: build.xml
clean:
[delete] Deleting directory C:\Documents and Settings\mirza\Desktop\hibernate
-3.1rc2\MyHibernate\bin
[mkdir] Created dir: C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc
2\MyHibernate\bin
copy-resources:
[copy] Copying 4 files to C:\Documents and Settings\mirza\Desktop\hibernate
-3.1rc2\MyHibernate\bin
compile:
[javac] Compiling 5 source files to C:\Documents and Settings\mirza\Desktop\
hibernate-3.1rc2\MyHibernate\bin
run:
[java] 09:12:54,820 INFO Environment:474 - Hibernate 3.1 rc2
[java] 09:12:54,836 INFO Environment:489 - loaded properties from resource
hibernate.properties: {hibernate.cglib.use_reflection_optimizer=true, hibernate
.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dial
ect=org.hibernate.dialect.SQLServerDialect, hibernate.max_fetch_depth=1, hiberna
te.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.
substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.cac
he.region_prefix=hibernate.test, hibernate.jdbc.batch_versioned_data=true, hiber
nate.connection.pool_size=1}
[java] 09:12:54,852 INFO Environment:519 - using java.io streams to persis
t binary types
[java] 09:12:54,852 INFO Environment:520 - using CGLIB reflection optimize
r
[java] 09:12:54,867 INFO Environment:550 - using JDK 1.4 java.sql.Timestam
p handling
[java] 09:12:54,946 INFO Configuration:1257 - configuring from resource: /
hibernate.cfg.xml
[java] 09:12:54,946 INFO Configuration:1234 - Configuration resource: /hib
ernate.cfg.xml
[java] 09:12:55,259 INFO Configuration:460 - Reading mappings from resourc
e: PCMapping.hbm.xml
[java] 09:12:55,400 INFO HbmBinder:266 - Mapping class: Parent -> Parent
[java] 09:12:55,447 INFO HbmBinder:266 - Mapping class: Child -> Child
[java] 09:12:55,447 INFO Configuration:1368 - Configured SessionFactory: n
ull
[java] 09:12:55,447 INFO Configuration:1014 - processing extends queue
[java] 09:12:55,447 INFO Configuration:1018 - processing collection mappin
gs
[java] 09:12:55,447 INFO HbmBinder:2233 - Mapping collection: Parent.child
ren -> Child
[java] 09:12:55,463 INFO Configuration:1027 - processing association prope
rty references
[java] 09:12:55,479 INFO Configuration:1049 - processing foreign key const
raints
[java] 09:12:55,557 INFO DriverManagerConnectionProvider:41 - Using Hibern
ate built-in connection pool (not for production use!)
[java] 09:12:55,557 INFO DriverManagerConnectionProvider:42 - Hibernate co
nnection pool size: 1
[java] 09:12:55,557 INFO DriverManagerConnectionProvider:45 - autocommit m
ode: false
[java] 09:12:55,573 INFO DriverManagerConnectionProvider:80 - using driver
: sun.jdbc.odbc.JdbcOdbcDriver at URL: jdbc:odbc:MySQL
[java] 09:12:55,573 INFO DriverManagerConnectionProvider:86 - connection p
roperties: {}
[java] 09:12:55,651 INFO SettingsFactory:77 - RDBMS: Microsoft SQL Server,
version: 08.00.0194
[java] 09:12:55,667 INFO SettingsFactory:78 - JDBC driver: JDBC-ODBC Bridg
e (SQLSRV32.DLL), version: 2.0001 (03.85.1117)
[java] 09:12:55,682 INFO Dialect:100 - Using dialect: org.hibernate.dialec
t.SQLServerDialect
[java] 09:12:55,698 INFO TransactionFactoryFactory:31 - Using default tran
saction strategy (direct JDBC transactions)
[java] 09:12:55,714 INFO TransactionManagerLookupFactory:33 - No Transacti
onManagerLookup configured (in JTA environment, use of read-write or transaction
al second-level cache is not recommended)
[java] 09:12:55,714 INFO SettingsFactory:125 - Automatic flush during befo
reCompletion(): disabled
[java] 09:12:55,714 INFO SettingsFactory:129 - Automatic session close at
end of transaction: disabled
[java] 09:12:55,729 INFO SettingsFactory:144 - Scrollable result sets: ena
bled
[java] 09:12:55,729 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): d
isabled
[java] 09:12:55,745 INFO SettingsFactory:160 - Connection release mode: au
to
[java] 09:12:55,745 INFO SettingsFactory:184 - Maximum outer join fetch de
pth: 1
[java] 09:12:55,745 INFO SettingsFactory:187 - Default batch fetch size: 1
[java] 09:12:55,745 INFO SettingsFactory:191 - Generate SQL with comments:
disabled
[java] 09:12:55,745 INFO SettingsFactory:195 - Order SQL updates by primar
y key: disabled
[java] 09:12:55,745 INFO SettingsFactory:338 - Query translator: org.hiber
nate.hql.ast.ASTQueryTranslatorFactory
[java] 09:12:55,777 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTran
slatorFactory
[java] 09:12:55,792 INFO SettingsFactory:203 - Query language substitution
s: {no='N', yes='Y'}
[java] 09:12:55,792 INFO SettingsFactory:209 - Second-level cache: enabled
[java] 09:12:55,792 INFO SettingsFactory:213 - Query cache: disabled
[java] 09:12:55,792 INFO SettingsFactory:325 - Cache provider: org.hiberna
te.cache.HashtableCacheProvider
[java] 09:12:55,808 INFO SettingsFactory:228 - Optimize cache for minimal
puts: disabled
[java] 09:12:55,808 INFO SettingsFactory:233 - Cache region prefix: hibern
ate.test
[java] 09:12:55,808 INFO SettingsFactory:237 - Structured second-level cac
he entries: disabled
[java] 09:12:55,839 INFO SettingsFactory:257 - Echoing all SQL to stdout
[java] 09:12:55,839 INFO SettingsFactory:264 - Statistics: disabled
[java] 09:12:55,839 INFO SettingsFactory:268 - Deleted entity synthetic id
entifier rollback: disabled
[java] 09:12:55,839 INFO SettingsFactory:283 - Default entity-mode: POJO
[java] 09:12:55,980 INFO SessionFactoryImpl:155 - building session factory
[java] 09:12:56,325 INFO SessionFactoryObjectFactory:82 - Not binding fact
ory to JNDI, no JNDI name configured
[java] 09:12:56,341 INFO Configuration:1014 - processing extends queue
[java] 09:12:56,341 INFO Configuration:1018 - processing collection mappin
gs
[java] 09:12:56,341 INFO Configuration:1027 - processing association prope
rty references
[java] 09:12:56,341 INFO Configuration:1049 - processing foreign key const
raints
[java] 09:12:56,356 INFO Configuration:1014 - processing extends queue
[java] 09:12:56,356 INFO Configuration:1018 - processing collection mappin
gs
[java] 09:12:56,356 INFO Configuration:1027 - processing association prope
rty references
[java] 09:12:56,372 INFO Configuration:1049 - processing foreign key const
raints
[java] 09:12:56,372 INFO SchemaExport:153 - Running hbm2ddl schema export
[java] 09:12:56,388 DEBUG SchemaExport:171 - import file not found: /import
.sql
[java] 09:12:56,388 INFO SchemaExport:180 - exporting generated schema to
database
[java] 09:12:56,403 DEBUG SchemaExport:283 -
[java] alter table Child
[java] drop constraint FK3E104FC976A59A
[java] 09:12:56,466 DEBUG SchemaExport:283 -
[java] drop table Child
[java] 09:12:56,544 DEBUG SchemaExport:283 -
[java] drop table Parent
[java] 09:12:56,654 DEBUG SchemaExport:283 -
[java] create table Child (
[java] id numeric(19,0) identity not null,
[java] name varchar(255) null,
[java] parent_id numeric(19,0) null,
[java] primary key (id)
[java] )
[java] 09:12:56,779 DEBUG SchemaExport:283 -
[java] create table Parent (
[java] id numeric(19,0) identity not null,
[java] primary key (id)
[java] )
[java] 09:12:56,873 DEBUG SchemaExport:283 -
[java] alter table Child
[java] add constraint FK3E104FC976A59A
[java] foreign key (parent_id)
[java] references Parent
[java] 09:12:56,952 INFO SchemaExport:200 - schema export complete
[java] 09:12:56,952 WARN JDBCExceptionReporter:48 - SQL Warning: 5701, SQL
State: 01000
[java] 09:12:56,952 WARN JDBCExceptionReporter:49 - [Microsoft][ODBC SQL S
erver Driver][SQL Server]Changed database context to 'master'.
[java] 09:12:56,952 WARN JDBCExceptionReporter:48 - SQL Warning: 5703, SQL
State: 01000
[java] 09:12:56,952 WARN JDBCExceptionReporter:49 - [Microsoft][ODBC SQL S
erver Driver][SQL Server]Changed language setting to us_english.
[java] 09:12:56,983 INFO SessionFactoryImpl:432 - Checking 0 named queries
[java] Hibernate:
[java] insert
[java] into
[java] Child
[java] (name)
[java] values
[java] (?) select
[java] scope_identity()
[java] Hibernate:
[java] insert
[java] into
[java] Child
[java] (name)
[java] values
[java] (?) select
[java] scope_identity()
[java] Hibernate:
[java] insert
[java] into
[java] Child
[java] (name)
[java] values
[java] (?) select
[java] scope_identity()
[java] Hibernate:
[java] insert
[java] into
[java] Parent
[java] default
[java] values
[java] select
[java] scope_identity()
[java] Hibernate:
[java] update
[java] Child
[java] set
[java] parent_id=?
[java] where
[java] id=?
[java] Hibernate:
[java] update
[java] Child
[java] set
[java] parent_id=?
[java] where
[java] id=?
[java] Hibernate:
[java] update
[java] Child
[java] set
[java] parent_id=?
[java] where
[java] id=?
[java] 09:12:57,390 INFO SessionFactoryImpl:831 - closing
[java] 09:12:57,390 INFO DriverManagerConnectionProvider:147 - cleaning up
connection pool: jdbc:odbc:MySQL
BUILD SUCCESSFUL
Total time: 5 seconds
Debug level Hibernate log excerpt:
Included in the above description.