-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: table for concrete class
PostPosted: Mon Jun 13, 2005 3:26 am 
Newbie

Joined: Mon Jan 17, 2005 5:43 am
Posts: 13
Location: Macau
Hi,

I'm using the "table for concrete class" to map a class hiberarcy.
Foo1 is an interface. Foo1Child1 and Foo1Child2 are two concrete
classes implementing Foo1. According to the doc, only two tables
should be generated, but actually it also generates a table for
Foo1.

Hibernate version:
3.0

Mapping documents:
Code:
<hibernate-mapping package="mo.org.cpttm.hierarchy">
   <class name="Foo1">
      <id name="id">
         <generator class="hilo"/>
      </id>
      <union-subclass name="Foo1Child1" table="Foo1Child1">
         <property name="name"/>
      </union-subclass>
      <union-subclass name="Foo1Child2" table="Foo1Child2">
         <property name="num"/>
      </union-subclass>
   </class>
</hibernate-mapping>


Name and version of the database you are using:
hsqldb-1.7.3.3

Debug output:
Code:
15:33:16,261  INFO Environment:460 - Hibernate 3.0
15:33:16,311  INFO Environment:473 - hibernate.properties not found
15:33:16,331  INFO Environment:506 - using CGLIB reflection optimizer
15:33:16,441  INFO Environment:536 - using JDK 1.4 java.sql.Timestamp handling
15:33:16,832  INFO Configuration:1159 - configuring from resource: /hibernate.cfg.xml
15:33:16,832  INFO Configuration:1130 - Configuration resource: /hibernate.cfg.xml
15:33:18,675 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath under org/hibernate/
15:33:18,705 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath
15:33:19,045 DEBUG Configuration:1116 - hibernate.dialect=org.hibernate.dialect.HSQLDialect
15:33:19,045 DEBUG Configuration:1116 - hibernate.connection.driver_class=org.hsqldb.jdbcDriver
15:33:19,065 DEBUG Configuration:1116 - hibernate.connection.username=sa
15:33:19,075 DEBUG Configuration:1116 - hibernate.connection.password=
15:33:19,075 DEBUG Configuration:1116 - hibernate.connection.url=jdbc:hsqldb:file:data/hierarchy
15:33:19,095 DEBUG Configuration:1116 - hibernate.show_sql=false
15:33:19,105 DEBUG Configuration:1116 - hibernate.hbm2ddl.auto=update
15:33:19,115 DEBUG Configuration:1311 - null<-org.dom4j.tree.DefaultAttribute@e45076 [Attribute: name resource value "mo/org/cpttm/hierarchy/Foo1.hbm.xml"]
15:33:19,125  INFO Configuration:440 - Mapping resource: mo/org/cpttm/hierarchy/Foo1.hbm.xml
15:33:19,145 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath under org/hibernate/
15:33:19,155 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd in classpath
15:33:20,177  INFO HbmBinder:258 - Mapping class: mo.org.cpttm.hierarchy.Foo1 -> Foo1
15:33:20,407 DEBUG HbmBinder:1089 - Mapped property: id -> id
15:33:20,748  INFO HbmBinder:717 - Mapping union-subclass: mo.org.cpttm.hierarchy.Foo1Child1 -> Foo1Child1
15:33:20,768 DEBUG HbmBinder:1089 - Mapped property: name -> name
15:33:20,768  INFO HbmBinder:717 - Mapping union-subclass: mo.org.cpttm.hierarchy.Foo1Child2 -> Foo1Child2
15:33:20,818 DEBUG HbmBinder:1089 - Mapped property: num -> num
15:33:20,828  INFO Configuration:1271 - Configured SessionFactory: null
15:33:20,828 DEBUG Configuration:1272 - properties: {hibernate.connection.password=, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\j2sdk1.4.2_04\jre\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=sa, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=TW, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=c:\workspace\Hierarchy, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\j2sdk1.4.2_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\kent\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.java2d.fontpath=, java.library.path=C:\j2sdk1.4.2_04\bin;.;C:\WINNT\system32;C:\WINNT;C:\Perl\bin\;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\j2sdk1.4.2_04\bin;c:\cygwin\bin;C:\Program Files\Common Files\GTK\2.0\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.0, user.home=C:\Documents and Settings\kent, user.timezone=Asia/Taipei, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=MS950_HKSCS, java.specification.version=1.4, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, user.name=kent, java.class.path=c:\workspace\Hierarchy;C:\hibernate-3.0\hibernate3.jar;C:\hibernate-3.0\lib\xml-apis.jar;C:\hibernate-3.0\lib\ant-antlr-1.6.2.jar;C:\hibernate-3.0\lib\ant-junit-1.6.2.jar;C:\hibernate-3.0\lib\ant-launcher-1.6.2.jar;C:\hibernate-3.0\lib\antlr-2.7.5H3.jar;C:\hibernate-3.0\lib\ant-swing-1.6.2.jar;C:\hibernate-3.0\lib\asm.jar;C:\hibernate-3.0\lib\asm-attrs.jar;C:\hibernate-3.0\lib\c3p0-0.8.5.jar;C:\hibernate-3.0\lib\cglib-2.1.jar;C:\hibernate-3.0\lib\cleanimports.jar;C:\hibernate-3.0\lib\commons-collections-2.1.1.jar;C:\hibernate-3.0\lib\commons-logging-1.0.4.jar;C:\hibernate-3.0\lib\concurrent-1.3.2.jar;C:\hibernate-3.0\lib\connector.jar;C:\hibernate-3.0\lib\dom4j-1.5.2.jar;C:\hibernate-3.0\lib\ehcache-1.1.jar;C:\hibernate-3.0\lib\jaas.jar;C:\hibernate-3.0\lib\jacc-1_0-fr.jar;C:\hibernate-3.0\lib\jaxen-1.1-beta-4.jar;C:\hibernate-3.0\lib\jboss-cache.jar;C:\hibernate-3.0\lib\jboss-common.jar;C:\hibernate-3.0\lib\jboss-jmx.jar;C:\hibernate-3.0\lib\jboss-system.jar;C:\hibernate-3.0\lib\jdbc2_0-stdext.jar;C:\hibernate-3.0\lib\jgroups-2.2.7.jar;C:\hibernate-3.0\lib\jta.jar;C:\hibernate-3.0\lib\junit-3.8.1.jar;C:\hibernate-3.0\lib\log4j-1.2.9.jar;C:\hibernate-3.0\lib\oscache-2.1.jar;C:\hibernate-3.0\lib\proxool-0.8.3.jar;C:\hibernate-3.0\lib\swarmcache-1.0rc2.jar;C:\hibernate-3.0\lib\versioncheck.jar;C:\hibernate-3.0\lib\xerces-2.6.2.jar;C:\hibernate-3.0\lib\ant-1.6.2.jar;C:\hsqldb-1.7.3.3\lib\hsqldb.jar;C:\jars\junit.jar, hibernate.show_sql=false, java.vm.specification.version=1.0, java.home=C:\j2sdk1.4.2_04\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:hsqldb:file:data/hierarchy, hibernate.dialect=org.hibernate.dialect.HSQLDialect, user.language=zh, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_04, java.ext.dirs=C:\j2sdk1.4.2_04\jre\lib\ext, sun.boot.class.path=C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\jre\lib\i18n.jar;C:\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_04\jre\lib\jsse.jar;C:\j2sdk1.4.2_04\jre\lib\jce.jar;C:\j2sdk1.4.2_04\jre\lib\charsets.jar;C:\j2sdk1.4.2_04\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.hbm2ddl.auto=update, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=pentium i486 i386}
15:33:20,838 DEBUG Configuration:1047 - Preparing to build session factory with filters : {}
15:33:20,838  INFO Configuration:851 - processing extends queue
15:33:20,838  INFO Configuration:855 - processing collection mappings
15:33:20,848  INFO Configuration:864 - processing association property references
15:33:20,848  INFO Configuration:893 - processing foreign key constraints
15:33:21,469  INFO Dialect:91 - Using dialect: org.hibernate.dialect.HSQLDialect
15:33:21,499 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
15:33:21,980  INFO SettingsFactory:90 - Default batch fetch size: 1
15:33:21,980  INFO SettingsFactory:94 - Generate SQL with comments: disabled
15:33:21,980  INFO SettingsFactory:98 - Order SQL updates by primary key: disabled
15:33:21,980  INFO SettingsFactory:273 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
15:33:22,040  INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
15:33:22,040  INFO SettingsFactory:106 - Query language substitutions: {}
15:33:22,961  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
15:33:22,961  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
15:33:22,961  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
15:33:23,082  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:data/hierarchy
15:33:23,082  INFO DriverManagerConnectionProvider:83 - connection properties: {user=sa, password=}
15:33:23,092 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
15:33:23,092 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
15:33:26,157 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:hsqldb:file:data/hierarchy, Isolation Level: 1
15:33:26,177 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
15:33:26,177  INFO SettingsFactory:148 - JDBC batch size: 15
15:33:26,177  INFO SettingsFactory:151 - JDBC batch updates for versioned data: disabled
15:33:26,187  INFO SettingsFactory:156 - Scrollable result sets: enabled
15:33:26,187 DEBUG SettingsFactory:160 - Wrap result sets: disabled
15:33:26,187  INFO SettingsFactory:164 - JDBC3 getGeneratedKeys(): disabled
15:33:26,197  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
15:33:26,247  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
15:33:26,247  INFO SettingsFactory:176 - Automatic flush during beforeCompletion(): disabled
15:33:26,247  INFO SettingsFactory:179 - Automatic session close at end of transaction: disabled
15:33:26,247  INFO SettingsFactory:260 - Cache provider: org.hibernate.cache.EhCacheProvider
15:33:26,267  INFO SettingsFactory:187 - Second-level cache: enabled
15:33:26,267  INFO SettingsFactory:192 - Optimize cache for minimal puts: disabled
15:33:26,277  INFO SettingsFactory:199 - Structured second-level cache entries: enabled
15:33:26,277  INFO SettingsFactory:203 - Query cache: disabled
15:33:26,287  INFO SettingsFactory:214 - Statistics: disabled
15:33:26,287  INFO SettingsFactory:218 - Deleted entity synthetic identifier rollback: disabled
15:33:26,287  INFO SettingsFactory:232 - Default entity-mode: pojo
15:33:27,429  INFO SessionFactoryImpl:140 - building session factory
15:33:27,439 DEBUG SessionFactoryImpl:149 - Session factory constructed with filter configurations : {}
15:33:27,439 DEBUG SessionFactoryImpl:152 - instantiating session factory with properties: {hibernate.connection.password=, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\j2sdk1.4.2_04\jre\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=sa, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=TW, sun.os.patch.level=Service Pack 4, java.vm.specification.name=Java Virtual Machine Specification, user.dir=c:\workspace\Hierarchy, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\j2sdk1.4.2_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\kent\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows 2000, sun.java2d.fontpath=, java.library.path=C:\j2sdk1.4.2_04\bin;.;C:\WINNT\system32;C:\WINNT;C:\Perl\bin\;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\j2sdk1.4.2_04\bin;c:\cygwin\bin;C:\Program Files\Common Files\GTK\2.0\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.0, user.home=C:\Documents and Settings\kent, user.timezone=Asia/Taipei, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=MS950_HKSCS, java.specification.version=1.4, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, user.name=kent, java.class.path=c:\workspace\Hierarchy;C:\hibernate-3.0\hibernate3.jar;C:\hibernate-3.0\lib\xml-apis.jar;C:\hibernate-3.0\lib\ant-antlr-1.6.2.jar;C:\hibernate-3.0\lib\ant-junit-1.6.2.jar;C:\hibernate-3.0\lib\ant-launcher-1.6.2.jar;C:\hibernate-3.0\lib\antlr-2.7.5H3.jar;C:\hibernate-3.0\lib\ant-swing-1.6.2.jar;C:\hibernate-3.0\lib\asm.jar;C:\hibernate-3.0\lib\asm-attrs.jar;C:\hibernate-3.0\lib\c3p0-0.8.5.jar;C:\hibernate-3.0\lib\cglib-2.1.jar;C:\hibernate-3.0\lib\cleanimports.jar;C:\hibernate-3.0\lib\commons-collections-2.1.1.jar;C:\hibernate-3.0\lib\commons-logging-1.0.4.jar;C:\hibernate-3.0\lib\concurrent-1.3.2.jar;C:\hibernate-3.0\lib\connector.jar;C:\hibernate-3.0\lib\dom4j-1.5.2.jar;C:\hibernate-3.0\lib\ehcache-1.1.jar;C:\hibernate-3.0\lib\jaas.jar;C:\hibernate-3.0\lib\jacc-1_0-fr.jar;C:\hibernate-3.0\lib\jaxen-1.1-beta-4.jar;C:\hibernate-3.0\lib\jboss-cache.jar;C:\hibernate-3.0\lib\jboss-common.jar;C:\hibernate-3.0\lib\jboss-jmx.jar;C:\hibernate-3.0\lib\jboss-system.jar;C:\hibernate-3.0\lib\jdbc2_0-stdext.jar;C:\hibernate-3.0\lib\jgroups-2.2.7.jar;C:\hibernate-3.0\lib\jta.jar;C:\hibernate-3.0\lib\junit-3.8.1.jar;C:\hibernate-3.0\lib\log4j-1.2.9.jar;C:\hibernate-3.0\lib\oscache-2.1.jar;C:\hibernate-3.0\lib\proxool-0.8.3.jar;C:\hibernate-3.0\lib\swarmcache-1.0rc2.jar;C:\hibernate-3.0\lib\versioncheck.jar;C:\hibernate-3.0\lib\xerces-2.6.2.jar;C:\hibernate-3.0\lib\ant-1.6.2.jar;C:\hsqldb-1.7.3.3\lib\hsqldb.jar;C:\jars\junit.jar, hibernate.show_sql=false, java.vm.specification.version=1.0, java.home=C:\j2sdk1.4.2_04\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:hsqldb:file:data/hierarchy, hibernate.dialect=org.hibernate.dialect.HSQLDialect, user.language=zh, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_04, java.ext.dirs=C:\j2sdk1.4.2_04\jre\lib\ext, sun.boot.class.path=C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\jre\lib\i18n.jar;C:\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_04\jre\lib\jsse.jar;C:\j2sdk1.4.2_04\jre\lib\jce.jar;C:\j2sdk1.4.2_04\jre\lib\charsets.jar;C:\j2sdk1.4.2_04\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, hibernate.hbm2ddl.auto=update, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=pentium i486 i386}
15:33:27,459 DEBUG CacheManager:191 - Creating new CacheManager with default config
15:33:27,479 DEBUG CacheManager:164 - Configuring ehcache from classpath.
15:33:27,509  WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/hibernate-3.0/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
15:33:27,549 DEBUG Configuration$DiskStore:185 - Disk Store Path: C:\DOCUME~1\kent\LOCALS~1\Temp\
15:33:28,420 DEBUG BasicEntityPersister:2234 - Static SQL for entity: mo.org.cpttm.hierarchy.Foo1Child2
15:33:28,420 DEBUG BasicEntityPersister:2236 -  Version select: select id from Foo1Child2 where id =?
15:33:28,420 DEBUG BasicEntityPersister:2237 -  Snapshot select: select foo1child2x_.id, foo1child2x_.num as num2_ from Foo1Child2 foo1child2x_ where foo1child2x_.id=?
15:33:28,440 DEBUG BasicEntityPersister:2239 -  Insert 0: insert into Foo1Child2 (num, id) values (?, ?)
15:33:28,440 DEBUG BasicEntityPersister:2240 -  Update 0: update Foo1Child2 set num=? where id=?
15:33:28,450 DEBUG BasicEntityPersister:2241 -  Delete 0: delete from Foo1Child2 where id=?
15:33:28,540 DEBUG BasicEntityPersister:2234 - Static SQL for entity: mo.org.cpttm.hierarchy.Foo1Child1
15:33:28,550 DEBUG BasicEntityPersister:2236 -  Version select: select id from Foo1Child1 where id =?
15:33:28,550 DEBUG BasicEntityPersister:2237 -  Snapshot select: select foo1child1x_.id, foo1child1x_.name as name1_ from Foo1Child1 foo1child1x_ where foo1child1x_.id=?
15:33:28,560 DEBUG BasicEntityPersister:2239 -  Insert 0: insert into Foo1Child1 (name, id) values (?, ?)
15:33:28,560 DEBUG BasicEntityPersister:2240 -  Update 0: update Foo1Child1 set name=? where id=?
15:33:28,560 DEBUG BasicEntityPersister:2241 -  Delete 0: delete from Foo1Child1 where id=?
15:33:28,630 DEBUG BasicEntityPersister:2234 - Static SQL for entity: mo.org.cpttm.hierarchy.Foo1
15:33:28,630 DEBUG BasicEntityPersister:2236 -  Version select: select id from Foo1 where id =?
15:33:28,630 DEBUG BasicEntityPersister:2237 -  Snapshot select: select foo1x_.id from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x_ where foo1x_.id=?
15:33:28,630 DEBUG BasicEntityPersister:2239 -  Insert 0: insert into Foo1 (id) values (?)
15:33:28,630 DEBUG BasicEntityPersister:2240 -  Update 0: null
15:33:28,651 DEBUG BasicEntityPersister:2241 -  Delete 0: delete from Foo1 where id=?
15:33:28,731 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num2_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
15:33:28,731 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num2_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
15:33:28,731 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num2_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
15:33:28,741 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child2: select foo1child2x0_.id as id0_, foo1child2x0_.num as num2_0_ from Foo1Child2 foo1child2x0_ where foo1child2x0_.id=?
15:33:28,741 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name1_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
15:33:28,741 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name1_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
15:33:28,761 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name1_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
15:33:28,771 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1Child1: select foo1child1x0_.id as id0_, foo1child1x0_.name as name1_0_ from Foo1Child1 foo1child1x0_ where foo1child1x0_.id=?
15:33:28,771 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1: select foo1x0_.id as id0_, foo1x0_.name as name1_0_, foo1x0_.num as num2_0_, foo1x0_.clazz_ as clazz_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ where foo1x0_.id=?
15:33:28,771 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1: select foo1x0_.id as id0_, foo1x0_.name as name1_0_, foo1x0_.num as num2_0_, foo1x0_.clazz_ as clazz_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ where foo1x0_.id=?
15:33:28,781 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1: select foo1x0_.id as id0_, foo1x0_.name as name1_0_, foo1x0_.num as num2_0_, foo1x0_.clazz_ as clazz_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ where foo1x0_.id=?
15:33:28,781 DEBUG EntityLoader:120 - Static select for entity mo.org.cpttm.hierarchy.Foo1: select foo1x0_.id as id0_, foo1x0_.name as name1_0_, foo1x0_.num as num2_0_, foo1x0_.clazz_ as clazz_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ where foo1x0_.id=?
15:33:28,811 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
15:33:28,821 DEBUG SessionFactoryObjectFactory:76 - registered: 297eaf3e04749df90104749e004d0000 (unnamed)
15:33:28,821  INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
15:33:28,821 DEBUG SessionFactoryImpl:249 - instantiated session factory
15:33:28,831  INFO Dialect:91 - Using dialect: org.hibernate.dialect.HSQLDialect
15:33:28,831  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
15:33:28,831  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
15:33:28,841  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
15:33:28,851  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:data/hierarchy
15:33:28,851  INFO DriverManagerConnectionProvider:83 - connection properties: {user=sa, password=}
15:33:28,851  INFO SchemaUpdate:105 - Running hbm2ddl schema update
15:33:28,851  INFO SchemaUpdate:117 - fetching database metadata
15:33:28,851 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
15:33:28,871 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
15:33:28,871 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:hsqldb:file:data/hierarchy, Isolation Level: 1
15:33:29,031  INFO SchemaUpdate:133 - updating schema
15:33:29,041  INFO Configuration:851 - processing extends queue
15:33:29,041  INFO Configuration:855 - processing collection mappings
15:33:29,041  INFO Configuration:864 - processing association property references
15:33:29,051  INFO Configuration:893 - processing foreign key constraints
15:33:29,141  INFO DatabaseMetadata:85 - table not found: Foo1
15:33:29,151  INFO DatabaseMetadata:85 - table not found: Foo1Child1
15:33:29,161  INFO DatabaseMetadata:85 - table not found: Foo1Child2
15:33:29,161  INFO DatabaseMetadata:85 - table not found: Foo1
15:33:29,181  INFO DatabaseMetadata:85 - table not found: Foo1Child1
15:33:29,191  INFO DatabaseMetadata:85 - table not found: Foo1Child2
15:33:29,201  INFO DatabaseMetadata:85 - table not found: hibernate_unique_key
15:33:29,201 DEBUG SchemaUpdate:142 - create table Foo1 (id bigint not null, primary key (id))
15:33:29,211 DEBUG SchemaUpdate:142 - create table Foo1Child1 (id bigint not null, name varchar(255), primary key (id))
15:33:29,211 DEBUG SchemaUpdate:142 - create table Foo1Child2 (id bigint not null, num integer, primary key (id))
15:33:29,221 DEBUG SchemaUpdate:142 - create table hibernate_unique_key ( next_hi integer )
15:33:29,221 DEBUG SchemaUpdate:142 - insert into hibernate_unique_key values ( 0 )
15:33:29,221  INFO SchemaUpdate:153 - schema update complete
15:33:29,231  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:file:data/hierarchy
15:33:29,231  INFO SessionFactoryImpl:366 - Checking 0 named queries
15:33:29,362 DEBUG SessionImpl:229 - opened session at timestamp: 4581982246019072
15:33:29,372 DEBUG JDBCTransaction:46 - begin
15:33:29,382 DEBUG AbstractBatcher:408 - opening JDBC connection
15:33:29,382 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
15:33:29,382 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
15:33:29,392 DEBUG JDBCTransaction:50 - current autocommit status: false
15:33:29,422 DEBUG SessionImpl:852 - iterate: select f from Foo1 as f
15:33:29,422 DEBUG QueryParameters:220 - named parameters: {}
15:33:29,672 DEBUG QueryTranslatorImpl:207 - parse() - HQL: select f from mo.org.cpttm.hierarchy.Foo1 as f
15:33:29,722 DEBUG AST:223 - --- HQL AST ---
\-[QUERY] 'query'
    \-[SELECT_FROM] 'SELECT_FROM'
       +-[FROM] 'from'
       |  +-[DOT] '.'
       |  |  +-[DOT] '.'
       |  |  |  +-[DOT] '.'
       |  |  |  |  +-[DOT] '.'
       |  |  |  |  |  +-[IDENT] 'mo'
       |  |  |  |  |  \-[IDENT] 'org'
       |  |  |  |  \-[IDENT] 'cpttm'
       |  |  |  \-[IDENT] 'hierarchy'
       |  |  \-[IDENT] 'Foo1'
       |  \-[ALIAS] 'f'
       \-[SELECT] 'select'
          \-[IDENT] 'f'

15:33:29,732 DEBUG ErrorCounter:72 - throwQueryException() : no errors
15:33:29,963  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:file:data/hierarchy
15:33:30,053 DEBUG HqlSqlBaseWalker:119 - query() << begin, level = 1
15:33:30,113 DEBUG FromElement:79 - FromClause{level=1} :  mo.org.cpttm.hierarchy.Foo1 (f) -> foo1x0_
15:33:30,123 DEBUG FromReferenceNode:48 - Resolved :  f -> foo1x0_.id
15:33:30,143 DEBUG HqlSqlBaseWalker:124 - query() : finishing up , level = 1
15:33:30,143 DEBUG HqlSqlWalker:328 - processQuery() :  ( SELECT ( {select clause} foo1x0_.id ) ( FromClause{level=1} ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ ) )
15:33:30,183 DEBUG JoinProcessor:112 - Using FROM fragment [( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_]
15:33:30,183 DEBUG HqlSqlBaseWalker:127 - query() >> end, level = 1
15:33:30,203 DEBUG AST:193 - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT'  querySpaces (Foo1Child1,Foo1,Foo1Child2)
    +-[SELECT_CLAUSE] SelectClause: '{select clause}'
    |  \-[ALIAS_REF] IdentNode: 'foo1x0_.id as col_0_0_' {alias=f, className=mo.org.cpttm.hierarchy.Foo1, tableAlias=foo1x0_}
    \-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[f], fromElementByTableAlias=[foo1x0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
       \-[FROM_FRAGMENT] FromElement: '( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_' FromElement{explicit,not a collection join,classAlias=f,role=null,tableName=( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ),tableAlias=foo1x0_,colums={,className=mo.org.cpttm.hierarchy.Foo1}}

15:33:30,203 DEBUG ErrorCounter:72 - throwQueryException() : no errors
15:33:30,233 DEBUG QueryTranslatorImpl:177 - HQL: select f from mo.org.cpttm.hierarchy.Foo1 as f
15:33:30,243 DEBUG QueryTranslatorImpl:178 - SQL: select foo1x0_.id as col_0_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_
15:33:30,243 DEBUG ErrorCounter:72 - throwQueryException() : no errors
15:33:30,263 DEBUG AbstractBatcher:276 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
15:33:30,273 DEBUG SQL:310 - select foo1x0_.id as col_0_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_
15:33:30,273 DEBUG AbstractBatcher:364 - preparing statement
15:33:30,313 DEBUG AbstractBatcher:292 - about to open ResultSet (open ResultSets: 0, globally: 0)
15:33:30,323 DEBUG IteratorImpl:89 - exhausted results
15:33:30,323 DEBUG IteratorImpl:68 - closing iterator
15:33:30,333 DEBUG AbstractBatcher:299 - about to close ResultSet (open ResultSets: 1, globally: 1)
15:33:30,333 DEBUG AbstractBatcher:284 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15:33:30,343 DEBUG AbstractBatcher:392 - closing statement
15:33:30,343 DEBUG JDBCTransaction:83 - commit
15:33:30,343 DEBUG SessionImpl:292 - automatically flushing session
15:33:30,343 DEBUG JDBCContext:208 - before transaction completion
15:33:30,353 DEBUG SessionImpl:337 - before transaction completion
15:33:30,353 DEBUG JDBCTransaction:96 - committed JDBC Connection
15:33:30,353 DEBUG JDBCContext:213 - after transaction completion
15:33:30,353 DEBUG SessionImpl:353 - after transaction completion
15:33:30,363 DEBUG SessionImpl:246 - closing session
15:33:30,363 DEBUG AbstractBatcher:423 - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
15:33:30,373 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
15:33:30,373 DEBUG JDBCContext:213 - after transaction completion
15:33:30,373 DEBUG SessionImpl:353 - after transaction completion
15:33:30,393 DEBUG SessionImpl:229 - opened session at timestamp: 4581982250569728
15:33:30,393 DEBUG JDBCTransaction:46 - begin
15:33:30,393 DEBUG AbstractBatcher:408 - opening JDBC connection
15:33:30,413 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
15:33:30,413 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
15:33:30,413 DEBUG JDBCTransaction:50 - current autocommit status: false
15:33:30,423 DEBUG DefaultSaveOrUpdateEventListener:159 - saving transient instance
15:33:30,423 DEBUG AbstractBatcher:408 - opening JDBC connection
15:33:30,433 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 1
15:33:30,433 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
15:33:30,433 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:hsqldb:file:data/hierarchy, Isolation Level: 1
15:33:30,443 DEBUG AbstractBatcher:423 - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
15:33:30,453 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
15:33:30,453 DEBUG TableHiLoGenerator:64 - new hi value: 0
15:33:30,453 DEBUG AbstractSaveEventListener:89 - generated identifier: 1, using strategy: org.hibernate.id.TableHiLoGenerator
15:33:30,463 DEBUG AbstractSaveEventListener:132 - saving [mo.org.cpttm.hierarchy.Foo1Child1#1]
15:33:30,534 DEBUG DefaultSaveOrUpdateEventListener:159 - saving transient instance
15:33:30,534 DEBUG AbstractSaveEventListener:89 - generated identifier: 2, using strategy: org.hibernate.id.TableHiLoGenerator
15:33:30,534 DEBUG AbstractSaveEventListener:132 - saving [mo.org.cpttm.hierarchy.Foo1Child2#2]
15:33:30,544 DEBUG JDBCTransaction:83 - commit
15:33:30,544 DEBUG SessionImpl:292 - automatically flushing session
15:33:30,544 DEBUG AbstractFlushingEventListener:52 - flushing session
15:33:30,544 DEBUG AbstractFlushingEventListener:102 - processing flush-time cascades
15:33:30,554 DEBUG AbstractFlushingEventListener:150 - dirty checking collections
15:33:30,554 DEBUG AbstractFlushingEventListener:167 - Flushing entities and processing referenced collections
15:33:30,574 DEBUG AbstractFlushingEventListener:203 - Processing unreferenced collections
15:33:30,574 DEBUG AbstractFlushingEventListener:217 - Scheduling collection removes/(re)creates/updates
15:33:30,574 DEBUG AbstractFlushingEventListener:79 - Flushed: 2 insertions, 0 updates, 0 deletions to 2 objects
15:33:30,574 DEBUG AbstractFlushingEventListener:85 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
15:33:30,584 DEBUG Printer:83 - listing entities:
15:33:30,584 DEBUG Printer:90 - mo.org.cpttm.hierarchy.Foo1Child1{name=aaa, id=1}
15:33:30,584 DEBUG Printer:90 - mo.org.cpttm.hierarchy.Foo1Child2{num=20, id=2}
15:33:30,584 DEBUG AbstractFlushingEventListener:267 - executing flush
15:33:30,594 DEBUG BasicEntityPersister:1838 - Inserting entity: [mo.org.cpttm.hierarchy.Foo1Child1#1]
15:33:30,594 DEBUG AbstractBatcher:276 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
15:33:30,594 DEBUG SQL:310 - insert into Foo1Child1 (name, id) values (?, ?)
15:33:30,614 DEBUG AbstractBatcher:364 - preparing statement
15:33:30,614 DEBUG BasicEntityPersister:1627 - Dehydrating entity: [mo.org.cpttm.hierarchy.Foo1Child1#1]
15:33:30,624 DEBUG StringType:59 - binding 'aaa' to parameter: 1
15:33:30,624 DEBUG LongType:59 - binding '1' to parameter: 2
15:33:30,634 DEBUG AbstractBatcher:27 - Adding to batch
15:33:30,634 DEBUG BasicEntityPersister:1838 - Inserting entity: [mo.org.cpttm.hierarchy.Foo1Child2#2]
15:33:30,634 DEBUG AbstractBatcher:54 - Executing batch size: 1
15:33:30,644 DEBUG AbstractBatcher:284 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15:33:30,644 DEBUG AbstractBatcher:392 - closing statement
15:33:30,644 DEBUG AbstractBatcher:276 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
15:33:30,644 DEBUG SQL:310 - insert into Foo1Child2 (num, id) values (?, ?)
15:33:30,654 DEBUG AbstractBatcher:364 - preparing statement
15:33:30,674 DEBUG BasicEntityPersister:1627 - Dehydrating entity: [mo.org.cpttm.hierarchy.Foo1Child2#2]
15:33:30,674 DEBUG IntegerType:59 - binding '20' to parameter: 1
15:33:30,684 DEBUG LongType:59 - binding '2' to parameter: 2
15:33:30,684 DEBUG AbstractBatcher:27 - Adding to batch
15:33:30,684 DEBUG AbstractBatcher:54 - Executing batch size: 1
15:33:30,684 DEBUG AbstractBatcher:284 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15:33:30,694 DEBUG AbstractBatcher:392 - closing statement
15:33:30,694 DEBUG AbstractFlushingEventListener:294 - post flush
15:33:30,694 DEBUG JDBCContext:208 - before transaction completion
15:33:30,694 DEBUG SessionImpl:337 - before transaction completion
15:33:30,714 DEBUG JDBCTransaction:96 - committed JDBC Connection
15:33:30,714 DEBUG JDBCContext:213 - after transaction completion
15:33:30,714 DEBUG SessionImpl:353 - after transaction completion
15:33:30,714 DEBUG SessionImpl:246 - closing session
15:33:30,724 DEBUG AbstractBatcher:423 - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
15:33:30,724 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 2
15:33:30,724 DEBUG JDBCContext:213 - after transaction completion
15:33:30,724 DEBUG SessionImpl:353 - after transaction completion
15:33:30,744 DEBUG SessionImpl:229 - opened session at timestamp: 4581982252007424
15:33:30,754 DEBUG JDBCTransaction:46 - begin
15:33:30,754 DEBUG AbstractBatcher:408 - opening JDBC connection
15:33:30,754 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
15:33:30,754 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 1
15:33:30,754 DEBUG JDBCTransaction:50 - current autocommit status: false
15:33:30,764 DEBUG SessionImpl:852 - iterate: from Foo1
15:33:30,764 DEBUG QueryParameters:220 - named parameters: {}
15:33:30,774 DEBUG QueryTranslatorImpl:207 - parse() - HQL: from mo.org.cpttm.hierarchy.Foo1
15:33:30,794 DEBUG AST:223 - --- HQL AST ---
\-[QUERY] 'query'
    \-[SELECT_FROM] 'SELECT_FROM'
       \-[FROM] 'from'
          \-[DOT] '.'
             +-[DOT] '.'
             |  +-[DOT] '.'
             |  |  +-[DOT] '.'
             |  |  |  +-[IDENT] 'mo'
             |  |  |  \-[IDENT] 'org'
             |  |  \-[IDENT] 'cpttm'
             |  \-[IDENT] 'hierarchy'
             \-[IDENT] 'Foo1'

15:33:30,794 DEBUG ErrorCounter:72 - throwQueryException() : no errors
15:33:30,814 DEBUG HqlSqlBaseWalker:119 - query() << begin, level = 1
15:33:30,814 DEBUG FromElement:79 - FromClause{level=1} :  mo.org.cpttm.hierarchy.Foo1 (no alias) -> foo1x0_
15:33:30,824 DEBUG JDBCContext:247 - running Session.finalize()
15:33:30,824 DEBUG HqlSqlBaseWalker:124 - query() : finishing up , level = 1
15:33:30,824 DEBUG HqlSqlWalker:328 - processQuery() :  ( SELECT ( FromClause{level=1} ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ ) )
15:33:30,834 DEBUG HqlSqlWalker:448 - Derived SELECT clause created.
15:33:30,834 DEBUG JoinProcessor:112 - Using FROM fragment [( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_]
15:33:30,844 DEBUG HqlSqlBaseWalker:127 - query() >> end, level = 1
15:33:30,844 DEBUG AST:193 - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT'  querySpaces (Foo1Child1,Foo1,Foo1Child2)
    +-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
    |  \-[SELECT_EXPR] SelectExpressionImpl: 'foo1x0_.id as col_0_0_' {FromElement{explicit,not a collection join,classAlias=null,role=null,tableName=( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ),tableAlias=foo1x0_,colums={,className=mo.org.cpttm.hierarchy.Foo1}}}
    \-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[foo1x0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
       \-[FROM_FRAGMENT] FromElement: '( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_' FromElement{explicit,not a collection join,classAlias=null,role=null,tableName=( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ),tableAlias=foo1x0_,colums={,className=mo.org.cpttm.hierarchy.Foo1}}

15:33:30,844 DEBUG ErrorCounter:72 - throwQueryException() : no errors
15:33:30,854 DEBUG QueryTranslatorImpl:177 - HQL: from mo.org.cpttm.hierarchy.Foo1
15:33:30,854 DEBUG QueryTranslatorImpl:178 - SQL: select foo1x0_.id as col_0_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_
15:33:30,864 DEBUG ErrorCounter:72 - throwQueryException() : no errors
15:33:30,864 DEBUG AbstractBatcher:276 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
15:33:30,864 DEBUG SQL:310 - select foo1x0_.id as col_0_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_
15:33:30,864 DEBUG AbstractBatcher:364 - preparing statement
15:33:30,874 DEBUG AbstractBatcher:292 - about to open ResultSet (open ResultSets: 0, globally: 0)
15:33:30,874 DEBUG IteratorImpl:93 - retrieving next results
15:33:30,874 DEBUG LongType:86 - returning '1' as column: col_0_0_
15:33:30,884 DEBUG DefaultLoadEventListener:193 - loading entity: [mo.org.cpttm.hierarchy.Foo1#1]
15:33:30,894 DEBUG DefaultLoadEventListener:240 - creating new proxy for entity
15:33:30,914 DEBUG IteratorImpl:93 - retrieving next results
15:33:30,914 DEBUG LongType:86 - returning '2' as column: col_0_0_
15:33:30,924 DEBUG DefaultLoadEventListener:193 - loading entity: [mo.org.cpttm.hierarchy.Foo1#2]
15:33:30,924 DEBUG DefaultLoadEventListener:240 - creating new proxy for entity
15:33:30,924 DEBUG IteratorImpl:136 - returning current results
15:33:30,934 DEBUG SessionImpl:573 - initializing proxy: [mo.org.cpttm.hierarchy.Foo1#1]
15:33:30,934 DEBUG DefaultLoadEventListener:326 - attempting to resolve: [mo.org.cpttm.hierarchy.Foo1#1]
15:33:30,934 DEBUG DefaultLoadEventListener:362 - object not resolved in any cache: [mo.org.cpttm.hierarchy.Foo1#1]
15:33:30,934 DEBUG BasicEntityPersister:2492 - Materializing entity: [mo.org.cpttm.hierarchy.Foo1#1]
15:33:30,944 DEBUG Loader:1266 - loading entity: [mo.org.cpttm.hierarchy.Foo1#1]
15:33:30,944 DEBUG AbstractBatcher:276 - about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
15:33:30,944 DEBUG SQL:310 - select foo1x0_.id as id0_, foo1x0_.name as name1_0_, foo1x0_.num as num2_0_, foo1x0_.clazz_ as clazz_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ where foo1x0_.id=?
15:33:30,954 DEBUG AbstractBatcher:364 - preparing statement
15:33:30,954 DEBUG LongType:59 - binding '1' to parameter: 1
15:33:30,964 DEBUG AbstractBatcher:292 - about to open ResultSet (open ResultSets: 1, globally: 1)
15:33:30,964 DEBUG Loader:380 - processing result set
15:33:30,974 DEBUG Loader:385 - result set row: 0
15:33:30,974 DEBUG Loader:760 - result row: EntityKey[mo.org.cpttm.hierarchy.Foo1#1]
15:33:30,974 DEBUG IntegerType:86 - returning '1' as column: clazz_0_
15:33:30,984 DEBUG Loader:905 - Initializing object from ResultSet: [mo.org.cpttm.hierarchy.Foo1Child1#1]
15:33:30,994 DEBUG BasicEntityPersister:1665 - Hydrating entity: [mo.org.cpttm.hierarchy.Foo1Child1#1]
15:33:30,994 DEBUG StringType:86 - returning 'aaa' as column: name1_0_
15:33:30,994 DEBUG Loader:404 - done processing result set (1 rows)
15:33:31,014 DEBUG AbstractBatcher:299 - about to close ResultSet (open ResultSets: 2, globally: 2)
15:33:31,014 DEBUG AbstractBatcher:284 - about to close PreparedStatement (open PreparedStatements: 2, globally: 2)
15:33:31,024 DEBUG AbstractBatcher:392 - closing statement
15:33:31,034 DEBUG Loader:490 - total objects hydrated: 1
15:33:31,034 DEBUG TwoPhaseLoad:96 - resolving associations for [mo.org.cpttm.hierarchy.Foo1Child1#1]
15:33:31,034 DEBUG TwoPhaseLoad:167 - done materializing entity [mo.org.cpttm.hierarchy.Foo1Child1#1]
15:33:31,034 DEBUG PersistenceContext:738 - initializing non-lazy collections
15:33:31,044 DEBUG Loader:1294 - done entity load
1 aaa
15:33:31,054 DEBUG IteratorImpl:89 - exhausted results
15:33:31,054 DEBUG IteratorImpl:68 - closing iterator
15:33:31,054 DEBUG AbstractBatcher:299 - about to close ResultSet (open ResultSets: 1, globally: 1)
15:33:31,054 DEBUG AbstractBatcher:284 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15:33:31,064 DEBUG AbstractBatcher:392 - closing statement
15:33:31,064 DEBUG IteratorImpl:136 - returning current results
15:33:31,064 DEBUG SessionImpl:573 - initializing proxy: [mo.org.cpttm.hierarchy.Foo1#2]
15:33:31,074 DEBUG DefaultLoadEventListener:326 - attempting to resolve: [mo.org.cpttm.hierarchy.Foo1#2]
15:33:31,074 DEBUG DefaultLoadEventListener:362 - object not resolved in any cache: [mo.org.cpttm.hierarchy.Foo1#2]
15:33:31,074 DEBUG BasicEntityPersister:2492 - Materializing entity: [mo.org.cpttm.hierarchy.Foo1#2]
15:33:31,074 DEBUG Loader:1266 - loading entity: [mo.org.cpttm.hierarchy.Foo1#2]
15:33:31,084 DEBUG AbstractBatcher:276 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
15:33:31,084 DEBUG SQL:310 - select foo1x0_.id as id0_, foo1x0_.name as name1_0_, foo1x0_.num as num2_0_, foo1x0_.clazz_ as clazz_0_ from ( select null as num, null as name, id, 0 as clazz_ from Foo1 union select null as num, name, id, 1 as clazz_ from Foo1Child1 union select num, null as name, id, 2 as clazz_ from Foo1Child2 ) foo1x0_ where foo1x0_.id=?
15:33:31,084 DEBUG AbstractBatcher:364 - preparing statement
15:33:31,094 DEBUG LongType:59 - binding '2' to parameter: 1
15:33:31,094 DEBUG AbstractBatcher:292 - about to open ResultSet (open ResultSets: 0, globally: 0)
15:33:31,104 DEBUG Loader:380 - processing result set
15:33:31,104 DEBUG Loader:385 - result set row: 0
15:33:31,104 DEBUG Loader:760 - result row: EntityKey[mo.org.cpttm.hierarchy.Foo1#2]
15:33:31,124 DEBUG IntegerType:86 - returning '2' as column: clazz_0_
15:33:31,124 DEBUG Loader:905 - Initializing object from ResultSet: [mo.org.cpttm.hierarchy.Foo1Child2#2]
15:33:31,124 DEBUG BasicEntityPersister:1665 - Hydrating entity: [mo.org.cpttm.hierarchy.Foo1Child2#2]
15:33:31,134 DEBUG IntegerType:86 - returning '20' as column: num2_0_
15:33:31,134 DEBUG Loader:404 - done processing result set (1 rows)
15:33:31,134 DEBUG AbstractBatcher:299 - about to close ResultSet (open ResultSets: 1, globally: 1)
15:33:31,134 DEBUG AbstractBatcher:284 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15:33:31,145 DEBUG AbstractBatcher:392 - closing statement
15:33:31,145 DEBUG Loader:490 - total objects hydrated: 1
15:33:31,145 DEBUG TwoPhaseLoad:96 - resolving associations for [mo.org.cpttm.hierarchy.Foo1Child2#2]
15:33:31,155 DEBUG TwoPhaseLoad:167 - done materializing entity [mo.org.cpttm.hierarchy.Foo1Child2#2]
15:33:31,155 DEBUG PersistenceContext:738 - initializing non-lazy collections
15:33:31,155 DEBUG Loader:1294 - done entity load
2 20
15:33:31,165 DEBUG JDBCTransaction:83 - commit
15:33:31,165 DEBUG SessionImpl:292 - automatically flushing session
15:33:31,165 DEBUG AbstractFlushingEventListener:52 - flushing session
15:33:31,165 DEBUG AbstractFlushingEventListener:102 - processing flush-time cascades
15:33:31,175 DEBUG AbstractFlushingEventListener:150 - dirty checking collections
15:33:31,175 DEBUG AbstractFlushingEventListener:167 - Flushing entities and processing referenced collections
15:33:31,175 DEBUG AbstractFlushingEventListener:203 - Processing unreferenced collections
15:33:31,185 DEBUG AbstractFlushingEventListener:217 - Scheduling collection removes/(re)creates/updates
15:33:31,185 DEBUG AbstractFlushingEventListener:79 - Flushed: 0 insertions, 0 updates, 0 deletions to 2 objects
15:33:31,185 DEBUG AbstractFlushingEventListener:85 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
15:33:31,195 DEBUG Printer:83 - listing entities:
15:33:31,195 DEBUG Printer:90 - mo.org.cpttm.hierarchy.Foo1Child1{name=aaa, id=1}
15:33:31,195 DEBUG Printer:90 - mo.org.cpttm.hierarchy.Foo1Child2{num=20, id=2}
15:33:31,195 DEBUG AbstractFlushingEventListener:267 - executing flush
15:33:31,195 DEBUG AbstractFlushingEventListener:294 - post flush
15:33:31,205 DEBUG JDBCContext:208 - before transaction completion
15:33:31,205 DEBUG SessionImpl:337 - before transaction completion
15:33:31,205 DEBUG JDBCTransaction:96 - committed JDBC Connection
15:33:31,205 DEBUG JDBCContext:213 - after transaction completion
15:33:31,215 DEBUG SessionImpl:353 - after transaction completion
15:33:31,215 DEBUG SessionImpl:246 - closing session
15:33:31,215 DEBUG AbstractBatcher:423 - closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)
15:33:31,215 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 2
15:33:31,215 DEBUG JDBCContext:213 - after transaction completion
15:33:31,235 DEBUG SessionImpl:353 - after transaction completion
15:33:31,235  INFO SessionFactoryImpl:684 - closing
15:33:31,235  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:file:data/hierarchy
Done!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 13, 2007 1:50 pm 
Beginner
Beginner

Joined: Mon Sep 05, 2005 4:48 pm
Posts: 31
You have to declare foo as abstract(abstract="true) on your mapping.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.