I have a class called SkillSet that can contain other SkillSets and can contain Skills. The mapping of the Skills to their containing Skillsets is working fine. For some reason, though, the SkillSet table ends up looking like this:
mysql> select * from skillsets;
+---------------+--------------------------+------------+
| skill_set_key | name | parent_key |
+---------------+--------------------------+------------+
| 1 | Base Nurse Travel Skills | NULL |
| 131072 | Core Skills | 0 |
+---------------+--------------------------+------------+
2 rows in set (0.11 sec)
mysql> select * from skillsets;
+---------------+--------------------------+------------+
| skill_set_key | name | parent_key |
+---------------+--------------------------+------------+
| 1 | Base Nurse Travel Skills | NULL |
| 131072 | Core Skills | 0 |
+---------------+--------------------------+------------+
2 rows in set (0.00 sec)
Notice there is no parent_key for the second skillset (which s/b the key of the first) and the skill_set_key for the second record is whacked. But if you read the logs below, there is no accounting for this!! It looks like Hibernate executed the right commands!
I am using the beta version of the Connector/J driver for MySQL. That must be the culprit (since this is easily the 3rd time I've dropped down an insane rabbit hole), but I would have thought that there would be more complaints on the web if the thing was this busted. Any clues w/b appreciated.
Hibernate version:
2.1.6
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping package="com.acme.skills">
<class name="SkillSet" table="skillSets">
<id
column="skill_set_key"
name="SkillSetKey"
type="integer"
>
<generator class="vm" />
</id>
<property
column="name"
length="40"
name="Name"
not-null="false"
type="string"
/>
<!-- Parent can be null for root categories. -->
<many-to-one name="parentSkillSet"
class="SkillSet"
column="PARENT_KEY"
cascade="none"
/>
<set name="subSkillSets"
table="SkillSets"
inverse="true"
cascade="save-update">
<key column="parent_key"/>
<one-to-many class="SkillSet" />
</set>
<set name="skills" lazy="true">
<key column="skill_set_key"/>
<one-to-many class="Skill"/>
</set>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping package="com.acme.skills">
<class name="Skill" table="skills">
<id
column="skill_key"
name="SkillKey"
type="integer"
>
<generator class="vm" />
</id>
<property
column="level"
length="11"
name="Level"
not-null="true"
type="integer"
/>
<property
column="name"
length="40"
name="Name"
not-null="false"
type="string"
/>
<many-to-one
name="SkillSet"
class="com.acme.skills.SkillSet"
column="skill_set_key"
/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
public void testSkillSetCreation() throws HibernateException{
SkillSet nurseGeneralSkills = new SkillSet("Base Nurse Travel Skills");
SkillSet coreSkills = new SkillSet("Core Skills");
nurseGeneralSkills.addSubSkillSet(coreSkills);
Skill patientAdmission = new Skill("Admission of a Patient");
Skill patientTransfer = new Skill("Transfer of a Patient");
patientAdmission.setLevel(new Integer(1));
patientTransfer.setLevel(new Integer(3));
coreSkills.addSkill(patientAdmission);
coreSkills.addSkill(patientTransfer);
session = HibernateUtil.currentSession();
session.save(patientAdmission);
session.save(patientTransfer);
session.save(nurseGeneralSkills);
session.flush();
}
Full stack trace of any exception that occurs:
N / A
Name and version of the database you are using:
MySQL 4.1
The generated SQL (show_sql=true):
15:17:18,713 ? DEBUG DTDEntityResolver:29 - found
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
15:17:20,458 ? INFO Configuration:627 - processing one-to-many association mappings
15:17:20,460 ? DEBUG Binder:1353 - Second pass for collection: com.acme.skills.SkillSet.subSkillSets
15:17:20,461 ? INFO Binder:1181 - Mapping collection: com.acme.skills.SkillSet.subSkillSets -> skillSets
15:17:20,463 ? DEBUG Binder:1368 - Mapped collection key: parent_key, one-to-many: com.acme.skills.SkillSet
15:17:20,464 ? DEBUG Binder:1353 - Second pass for collection: com.acme.skills.SkillSet.skills
15:17:20,507 ? INFO Binder:1181 - Mapping collection: com.acme.skills.SkillSet.skills -> skills
15:17:20,509 ? DEBUG Binder:1368 - Mapped collection key: skill_set_key, one-to-many: com.acme.skills.Skill
15:17:20,515 ? INFO Configuration:636 - processing one-to-one association property references
15:17:20,516 ? INFO Configuration:661 - processing foreign key constraints
15:17:20,518 ? DEBUG Configuration:678 - resolving reference to class: com.acme.skills.SkillSet
15:17:20,521 ? DEBUG Configuration:678 - resolving reference to class: com.acme.skills.SkillSet
15:17:20,591 ? INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect
15:17:20,661 ? INFO SettingsFactory:59 - Maximim outer join fetch depth: 2
15:17:20,662 ? INFO SettingsFactory:63 - Use outer join fetching: true
15:17:20,677 ? INFO DriverManagerConnectionProvider:42 - Using Hibernate built-in connection pool (not for production use!)
15:17:20,679 ? INFO DriverManagerConnectionProvider:43 - Hibernate connection pool size: 20
15:17:20,696 ? INFO DriverManagerConnectionProvider:77 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/acme
15:17:20,698 ? INFO DriverManagerConnectionProvider:78 - connection properties: {user=root, password=ope18195}
15:17:20,861 ? INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
15:17:20,863 ? DEBUG DriverManagerConnectionProvider:84 - total checked-out connections: 0
15:17:20,864 ? DEBUG DriverManagerConnectionProvider:100 - opening new JDBC connection
15:17:22,490 ? DEBUG DriverManagerConnectionProvider:106 - created connection to: jdbc:mysql://localhost/acme, Isolation Level: 4
15:17:22,496 ? DEBUG DriverManagerConnectionProvider:120 - returning connection to pool, pool size: 1
15:17:22,497 ? INFO SettingsFactory:103 - Use scrollable result sets: true
15:17:22,498 ? INFO SettingsFactory:106 - Use JDBC3 getGeneratedKeys(): true
15:17:22,498 ? INFO SettingsFactory:109 - Optimize cache for minimal puts: false
15:17:22,501 ? INFO SettingsFactory:115 - echoing all SQL to stdout
15:17:22,502 ? INFO SettingsFactory:118 - Query language substitutions: {}
15:17:22,503 ? INFO SettingsFactory:129 - cache provider: net.sf.hibernate.cache.EhCacheProvider
15:17:22,516 ? INFO Configuration:1116 - instantiating and configuring caches
15:17:24,000 ? INFO SessionFactoryImpl:118 - building session factory
15:17:24,002 ? DEBUG SessionFactoryImpl:124 - instantiating session factory with properties: {hibernate.connection.password=ope18195, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries, java.vm.version=1.4.2-38, awt.nativeDoubleBuffering=true, hibernate.connection.username=root, gopherProxySet=false, java.vm.vendor="Apple Computer, Inc.", java.vendor.url=http://apple.com/, path.separator=:, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search, java.runtime.version=1.4.2_05-141.3, java.awt.graphicsenv=apple.awt.CGraphicsEnvironment, java.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/endorsed, os.arch=ppc, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Mac OS X, sun.java2d.fontpath=, java.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory, os.version=10.3.5, user.home=/Users/wilycoyote, user.timezone=America/Los_Angeles, java.awt.printerjob=apple.awt.CPrinterJob, file.encoding=MacRoman, java.specification.version=1.4, hibernate.connection.driver_class=com.mysql.jdbc.Driver, user.name=wilycoyote, java.class.path=/Applications/eclipse/eclipse3/plugins/org.eclipse.jdt.junit_3.0.0/junitsupport.jar:/Applications/eclipse/eclipse3/plugins/org.eclipse.jdt.junit.runtime_3.0.0/junitruntime.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/classes:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/ant.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/commons-collections-2.1.1.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/commons-dbcp-1.2.1.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/commons-el.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/commons-pool-1.2.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/jasper-compiler.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/jasper-runtime.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/jsp-api.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/mysql-connector-java-3.1.3-beta-bin.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/naming-common.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/naming-factory.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/naming-java.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/naming-resources.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/lib/servlet-api.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/endorsed/xercesImpl.jar:/Library/Tomcat/jakarta-tomcat-5.0.27/common/endorsed/xml-apis.jar:/Applications/eclipse/eclipse3/plugins/org.junit_3.8.1/junit.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/xalan-2.4.0.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/commons-logging-1.0.3.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/jta.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/ehcache-0.7.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/xerces-2.4.0.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/proxool-0.8.3.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/cglib-full-2.0.1.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/dom4j-1.4.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/log4j-1.2.8.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/xml-apis.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/jdom.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/hibernate2.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/jdbc2_0-stdext.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/commons-collections-2.1.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/odmg-3.0.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/junit-3.8.1.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/commons-digester.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/standard.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/jstl.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/jsf-api.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/commons-beanutils.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/jsf-impl.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/mail.jar:/Users/wilycoyote/Projects/eclipse/workspace/com.acme.search/WebContent/WEB-INF/lib/activation.jar, hibernate.show_sql=true, java.vm.specification.version=1.0, java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://localhost/acme, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=apple.awt.CToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_05, java.ext.dirs=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext, sun.boot.class.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/charsets.jar, java.vendor=Apple Computer, Inc., file.separator=/, java.vendor.url.bug=http://developer.apple.com/java/, sun.io.unicode.encoding=UnicodeBig, sun.cpu.endian=big, hibernate.use_outer_join=true, mrj.version=141.3, dialect=net.sf.hibernate.dialect.MySQLDialect, sun.cpu.isalist=}
15:17:26,750 ? INFO ReflectHelper:186 - reflection optimizer disabled for: com.acme.search.Search, BulkBeanException: null (property setEmail)
15:17:27,887 ? DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
15:17:28,099 ? DEBUG SessionFactoryObjectFactory:76 - registered: 40288182ff41f82700ff41f83c450000 (unnamed)
15:17:28,227 ? INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
15:17:28,228 ? DEBUG SessionFactoryImpl:195 - instantiated session factory
Sep 27, 2004 3:17:28 PM com.acme.util.HibernateUtil currentSession
INFO: Reloading session.
15:17:28,705 ? DEBUG SessionImpl:555 - opened session
15:17:28,755 ? DEBUG DriverManagerConnectionProvider:84 - total checked-out connections: 0
15:17:28,849 ? DEBUG DriverManagerConnectionProvider:90 - using pooled JDBC connection, pool size: 0
15:17:28,850 ? DEBUG IncrementGenerator:62 - fetching initial value: select max(skill_key) from skills
15:17:28,890 ? DEBUG IncrementGenerator:76 - first free id: 1
15:17:28,892 ? DEBUG SessionImpl:778 - generated identifier: 1
15:17:28,933 ? DEBUG SessionImpl:825 - saving [com.acme.skills.Skill#1]
15:17:28,949 ? DEBUG SessionImpl:778 - generated identifier: 2
15:17:28,954 ? DEBUG SessionImpl:825 - saving [com.acme.skills.Skill#2]
15:17:28,956 ? DEBUG IncrementGenerator:62 - fetching initial value: select max(skill_set_key) from skillSets
15:17:28,959 ? DEBUG IncrementGenerator:76 - first free id: 1
15:17:28,960 ? DEBUG SessionImpl:778 - generated identifier: 1
15:17:28,962 ? DEBUG SessionImpl:825 - saving [com.acme.skills.SkillSet#1]
15:17:28,967 ? DEBUG Cascades:497 - processing cascades for: com.acme.skills.SkillSet
15:17:28,992 ? DEBUG Cascades:506 - done processing cascades for: com.acme.skills.SkillSet
15:17:29,027 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.subSkillSets
15:17:29,028 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.skills
15:17:29,030 ? DEBUG Cascades:497 - processing cascades for: com.acme.skills.SkillSet
15:17:29,031 ? DEBUG Cascades:524 - cascading to collection: com.acme.skills.SkillSet.subSkillSets
15:17:29,045 ? DEBUG Cascades:113 - cascading to saveOrUpdate()
15:17:29,046 ? DEBUG SessionImpl:1387 - saveOrUpdate() unsaved instance
15:17:29,048 ? DEBUG SessionImpl:778 - generated identifier: 2
15:17:29,049 ? DEBUG SessionImpl:825 - saving [com.acme.skills.SkillSet#2]
15:17:29,050 ? DEBUG Cascades:497 - processing cascades for: com.acme.skills.SkillSet
15:17:29,051 ? DEBUG Cascades:506 - done processing cascades for: com.acme.skills.SkillSet
15:17:29,054 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.subSkillSets
15:17:29,059 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.skills
15:17:29,061 ? DEBUG Cascades:497 - processing cascades for: com.acme.skills.SkillSet
15:17:29,063 ? DEBUG Cascades:524 - cascading to collection: com.acme.skills.SkillSet.subSkillSets
15:17:29,068 ? DEBUG Cascades:506 - done processing cascades for: com.acme.skills.SkillSet
15:17:29,070 ? DEBUG Cascades:506 - done processing cascades for: com.acme.skills.SkillSet
15:17:29,072 ? DEBUG SessionImpl:2246 - flushing session
15:17:29,077 ? DEBUG Cascades:497 - processing cascades for: com.acme.skills.SkillSet
15:17:29,078 ? DEBUG Cascades:524 - cascading to collection: com.acme.skills.SkillSet.subSkillSets
15:17:29,079 ? DEBUG Cascades:113 - cascading to saveOrUpdate()
15:17:29,080 ? DEBUG SessionImpl:1372 - saveOrUpdate() persistent instance
15:17:29,085 ? DEBUG Cascades:506 - done processing cascades for: com.acme.skills.SkillSet
15:17:29,090 ? DEBUG Cascades:497 - processing cascades for: com.acme.skills.SkillSet
15:17:29,091 ? DEBUG Cascades:524 - cascading to collection: com.acme.skills.SkillSet.subSkillSets
15:17:29,094 ? DEBUG Cascades:506 - done processing cascades for: com.acme.skills.SkillSet
15:17:29,095 ? DEBUG SessionImpl:2439 - Flushing entities and processing referenced collections
15:17:29,216 ? DEBUG AbstractEntityPersister:275 - com.acme.skills.Skill.SkillSet is dirty
15:17:29,218 ? DEBUG SessionImpl:2533 - Updating entity: [com.acme.skills.Skill#1]
15:17:29,250 ? DEBUG AbstractEntityPersister:275 - com.acme.skills.Skill.SkillSet is dirty
15:17:29,251 ? DEBUG SessionImpl:2533 - Updating entity: [com.acme.skills.Skill#2]
15:17:29,454 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.subSkillSets
15:17:29,459 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.skills
15:17:29,464 ? DEBUG SessionImpl:2884 - Collection found: [com.acme.skills.SkillSet.subSkillSets#1], was: [<unreferenced>]
15:17:29,466 ? DEBUG SessionImpl:2884 - Collection found: [com.acme.skills.SkillSet.skills#1], was: [<unreferenced>]
15:17:29,468 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.subSkillSets
15:17:29,600 ? DEBUG WrapVisitor:81 - Wrapped collection in role: com.acme.skills.SkillSet.skills
15:17:29,601 ? DEBUG SessionImpl:2884 - Collection found: [com.acme.skills.SkillSet.subSkillSets#2], was: [<unreferenced>]
15:17:29,603 ? DEBUG SessionImpl:2884 - Collection found: [com.acme.skills.SkillSet.skills#2], was: [<unreferenced>]
15:17:29,604 ? DEBUG SessionImpl:2780 - Processing unreferenced collections
15:17:29,605 ? DEBUG SessionImpl:2794 - Scheduling collection removes/(re)creates/updates
15:17:29,614 ? DEBUG SessionImpl:2270 - Flushed: 4 insertions, 2 updates, 0 deletions to 4 objects
15:17:29,618 ? DEBUG SessionImpl:2275 - Flushed: 4 (re)creations, 0 updates, 0 removals to 8 collections
15:17:29,623 ? DEBUG Printer:75 - listing entities:
15:17:29,630 ? DEBUG Printer:82 - com.acme.skills.Skill{SkillSet=SkillSet#2, Name=Admission of a Patient, Level=1, SkillKey=1}
15:17:29,632 ? DEBUG Printer:82 - com.acme.skills.Skill{SkillSet=SkillSet#2, Name=Transfer of a Patient, Level=3, SkillKey=2}
15:17:29,634 ? DEBUG Printer:82 - com.acme.skills.SkillSet{subSkillSets=[], skills=[Skill#1, Skill#2], Name=Core Skills, SkillSetKey=2, parentSkillSet=SkillSet#1}
15:17:29,638 ? DEBUG Printer:82 - com.acme.skills.SkillSet{subSkillSets=[SkillSet#2], skills=[], Name=Base Nurse Travel Skills, SkillSetKey=1, parentSkillSet=null}
15:17:29,639 ? DEBUG SessionImpl:2359 - executing flush
15:17:29,641 ? DEBUG EntityPersister:453 - Inserting entity: [com.acme.skills.Skill#1]
15:17:29,642 ? DEBUG BatcherImpl:200 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:17:29,645 ? DEBUG SQL:226 - insert into skills (level, name, skill_set_key, skill_key) values (?, ?, ?, ?)
Hibernate: insert into skills (level, name, skill_set_key, skill_key) values (?, ?, ?, ?)
15:17:29,647 ? DEBUG BatcherImpl:249 - preparing statement
15:17:29,709 ? DEBUG EntityPersister:388 - Dehydrating entity: [com.acme.skills.Skill#1]
15:17:29,711 ? DEBUG IntegerType:46 - binding '1' to parameter: 1
15:17:29,713 ? DEBUG StringType:46 - binding 'Admission of a Patient' to parameter: 2
15:17:29,715 ? DEBUG IntegerType:41 - binding null to parameter: 3
15:17:29,718 ? DEBUG IntegerType:46 - binding '1' to parameter: 4
15:17:29,720 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:29,793 ? DEBUG EntityPersister:453 - Inserting entity: [com.acme.skills.Skill#2]
15:17:29,795 ? DEBUG BatcherImpl:113 - reusing prepared statement
15:17:29,796 ? DEBUG SQL:226 - insert into skills (level, name, skill_set_key, skill_key) values (?, ?, ?, ?)
Hibernate: insert into skills (level, name, skill_set_key, skill_key) values (?, ?, ?, ?)
15:17:29,797 ? DEBUG EntityPersister:388 - Dehydrating entity: [com.acme.skills.Skill#2]
15:17:29,801 ? DEBUG IntegerType:46 - binding '3' to parameter: 1
15:17:29,802 ? DEBUG StringType:46 - binding 'Transfer of a Patient' to parameter: 2
15:17:29,805 ? DEBUG IntegerType:41 - binding null to parameter: 3
15:17:29,806 ? DEBUG IntegerType:46 - binding '2' to parameter: 4
15:17:29,807 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:29,808 ? DEBUG EntityPersister:453 - Inserting entity: [com.acme.skills.SkillSet#1]
15:17:29,810 ? DEBUG BatcherImpl:50 - Executing batch size: 2
15:17:29,815 ? DEBUG BatcherImpl:207 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:17:29,816 ? DEBUG BatcherImpl:269 - closing statement
15:17:29,818 ? DEBUG BatcherImpl:200 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:17:29,819 ? DEBUG SQL:226 - insert into skillSets (name, PARENT_KEY, skill_set_key) values (?, ?, ?)
Hibernate: insert into skillSets (name, PARENT_KEY, skill_set_key) values (?, ?, ?)
15:17:29,825 ? DEBUG BatcherImpl:249 - preparing statement
15:17:29,827 ? DEBUG EntityPersister:388 - Dehydrating entity: [com.acme.skills.SkillSet#1]
15:17:29,828 ? DEBUG StringType:46 - binding 'Base Nurse Travel Skills' to parameter: 1
15:17:29,829 ? DEBUG IntegerType:41 - binding null to parameter: 2
15:17:29,831 ? DEBUG IntegerType:46 - binding '1' to parameter: 3
15:17:29,832 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:29,833 ? DEBUG EntityPersister:453 - Inserting entity: [com.acme.skills.SkillSet#2]
15:17:29,834 ? DEBUG BatcherImpl:113 - reusing prepared statement
15:17:29,837 ? DEBUG SQL:226 - insert into skillSets (name, PARENT_KEY, skill_set_key) values (?, ?, ?)
Hibernate: insert into skillSets (name, PARENT_KEY, skill_set_key) values (?, ?, ?)
15:17:29,840 ? DEBUG EntityPersister:388 - Dehydrating entity: [com.acme.skills.SkillSet#2]
15:17:29,841 ? DEBUG StringType:46 - binding 'Core Skills' to parameter: 1
15:17:29,843 ? DEBUG IntegerType:46 - binding '1' to parameter: 2
15:17:29,847 ? DEBUG IntegerType:46 - binding '2' to parameter: 3
15:17:29,848 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:29,912 ? DEBUG BatcherImpl:50 - Executing batch size: 2
15:17:29,916 ? DEBUG BatcherImpl:207 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:17:29,918 ? DEBUG BatcherImpl:269 - closing statement
15:17:29,919 ? DEBUG EntityPersister:648 - Updating entity: [com.acme.skills.Skill#1]
15:17:29,920 ? DEBUG BatcherImpl:200 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:17:29,921 ? DEBUG SQL:226 - update skills set level=?, name=?, skill_set_key=? where skill_key=?
Hibernate: update skills set level=?, name=?, skill_set_key=? where skill_key=?
15:17:29,924 ? DEBUG BatcherImpl:249 - preparing statement
15:17:29,926 ? DEBUG EntityPersister:388 - Dehydrating entity: [com.acme.skills.Skill#1]
15:17:29,927 ? DEBUG IntegerType:46 - binding '1' to parameter: 1
15:17:29,933 ? DEBUG StringType:46 - binding 'Admission of a Patient' to parameter: 2
15:17:29,934 ? DEBUG IntegerType:46 - binding '2' to parameter: 3
15:17:29,936 ? DEBUG IntegerType:46 - binding '1' to parameter: 4
15:17:29,937 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:29,938 ? DEBUG EntityPersister:648 - Updating entity: [com.acme.skills.Skill#2]
15:17:29,939 ? DEBUG BatcherImpl:113 - reusing prepared statement
15:17:29,940 ? DEBUG SQL:226 - update skills set level=?, name=?, skill_set_key=? where skill_key=?
Hibernate: update skills set level=?, name=?, skill_set_key=? where skill_key=?
15:17:29,942 ? DEBUG EntityPersister:388 - Dehydrating entity: [com.acme.skills.Skill#2]
15:17:29,943 ? DEBUG IntegerType:46 - binding '3' to parameter: 1
15:17:29,999 ? DEBUG StringType:46 - binding 'Transfer of a Patient' to parameter: 2
15:17:30,004 ? DEBUG IntegerType:46 - binding '2' to parameter: 3
15:17:30,007 ? DEBUG IntegerType:46 - binding '2' to parameter: 4
15:17:30,009 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:30,010 ? DEBUG BatcherImpl:50 - Executing batch size: 2
15:17:30,073 ? DEBUG BatcherImpl:207 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:17:30,074 ? DEBUG BatcherImpl:269 - closing statement
15:17:30,077 ? DEBUG BasicCollectionPersister:508 - Inserting collection: [com.acme.skills.SkillSet.skills#1]
15:17:30,079 ? DEBUG BasicCollectionPersister:539 - collection was empty
15:17:30,080 ? DEBUG BasicCollectionPersister:508 - Inserting collection: [com.acme.skills.SkillSet.skills#2]
15:17:30,083 ? DEBUG BatcherImpl:200 - about to open: 0 open PreparedStatements, 0 open ResultSets
15:17:30,084 ? DEBUG SQL:226 - update skills set skill_set_key=? where skill_key=?
Hibernate: update skills set skill_set_key=? where skill_key=?
15:17:30,086 ? DEBUG BatcherImpl:249 - preparing statement
15:17:30,088 ? DEBUG IntegerType:46 - binding '2' to parameter: 1
15:17:30,092 ? DEBUG IntegerType:46 - binding '1' to parameter: 2
15:17:30,096 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:30,116 ? DEBUG BatcherImpl:113 - reusing prepared statement
15:17:30,118 ? DEBUG SQL:226 - update skills set skill_set_key=? where skill_key=?
Hibernate: update skills set skill_set_key=? where skill_key=?
15:17:30,120 ? DEBUG IntegerType:46 - binding '2' to parameter: 1
15:17:30,121 ? DEBUG IntegerType:46 - binding '2' to parameter: 2
15:17:30,122 ? DEBUG BatcherImpl:28 - Adding to batch
15:17:30,125 ? DEBUG BasicCollectionPersister:530 - done inserting collection: 2 rows inserted
15:17:30,126 ? DEBUG BatcherImpl:50 - Executing batch size: 2
15:17:30,170 ? DEBUG BatcherImpl:207 - done closing: 0 open PreparedStatements, 0 open ResultSets
15:17:30,173 ? DEBUG BatcherImpl:269 - closing statement
15:17:30,178 ? DEBUG SessionImpl:2824 - post flush
15:17:30,184 ? DEBUG SessionImpl:573 - closing session
15:17:30,185 ? DEBUG SessionImpl:3336 - disconnecting session
15:17:30,191 ? DEBUG DriverManagerConnectionProvider:120 - returning connection to pool, pool size: 1
15:17:30,193 ? DEBUG SessionImpl:585 - transaction completion
Debug level Hibernate log excerpt:
See above.