-->
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.  [ 3 posts ] 
Author Message
 Post subject: Mixed inheritance hierarchy and lazy loading problem
PostPosted: Fri Apr 15, 2005 10:00 am 
Newbie

Joined: Thu Apr 14, 2005 6:26 pm
Posts: 4
Hi all,
I have a problem and I looked all over the forum but I couldn't find anyone with a similar issue. I'm using a mixed inheritance mapping of table per class hierarchy with table per subclass. Everything is working great except when I go to lazy load any collection. It seems that the sql generated to pull the data from the db is just slightly off. I'll give and example...

My 'Sampled' object has a collection of 'SelectedKeyComponent' objects. Sampled is a subclass of Part which is a subclass of BusinessObject. SelectedKeyComponent is a subclass of Component which is a subclass of Part which is a subclass of BusinessObject. The query which is generated to get this collection thinks that a column which is in the SelectedKeyComponents table is in the BusinessObject table (the super class table). Thus it throws the exception 'Invalid column name'. I can actually change the query when I'm debugging through the application and everything runs fine. So I'm wondering what I need to change in my mappings to get this to work. I hope that I've provided enough info for someone to help me, if not let me know and I'll try to post more.

*Note some of the names of objects/tables/packages have been either changed or removed in order for me to comply with my company's policy. The basic structure is still the same.

Thanks in advance.


Hibernate version: Hibernate 3.0


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>
<!-- BUSINESS OBJECT -->
<class name="BusinessObject"
table="BusinessObject" abstract="true" polymorphism="explicit">

<id name="id" column="id" type="integer">
<generator class="identity"></generator>
</id>
<discriminator column="type" type="string" />
<property name="testProgram" type="string" column="testProgram"
not-null="true" unique="false" />

<!-- UNIT TESTED-->
<subclass name="UnitTested"
discriminator-value="UnitTested">

<join table="UnitTested">
<key column="id" />
<property name="mainTestConfiguration" type="string"
column="mainTestConfiguration" not-null="false" unique="false" />
<property name="testScheduleDate" type="date"
column="testScheduleDate" not-null="false" unique="false" />
<property name="materialType" type="string"
column="materialType" not-null="false" unique="false" />
<property name="notes" type="string" column="notes"
not-null="false" unique="false" />
<property name="testProgramType" type="string"
column="testProgramType" not-null="true" unique="false" />
<property name="outcome" type="string" column="outcome"
not-null="false" unique="false" />
<property name="source" type="string" column="source"
not-null="true" unique="false" />

<many-to-one name="cycleSelected"
class="CycleSelected"
cascade="all" outer-join="auto" column="selectedTestCycleId"
not-null="false" />
<many-to-one name="cycleTested"
class="CycleTested"
cascade="all" outer-join="auto" column="testedTestCycleId"
not-null="false" />
<many-to-one name="sampled"
class="Sampled"
cascade="all" outer-join="auto" column="sampledId"
not-null="false" />
<many-to-one name="jta"
class="JTA" cascade="all"
outer-join="auto" column="jtaId" not-null="false" />
<many-to-one name="testbed"
class="Testbed" cascade="all"
outer-join="auto" column="testbedId" not-null="false" />
</join>
</subclass>

<!-- TESTER -->
<subclass name="Tester"
discriminator-value="Tester">
<set name="testDefinitions" table="TestDefinition"
inverse="true" cascade="all" sort="unsorted">
<key column="testerId"></key>
<one-to-many
class="Tester" />
</set>
<join table="Tester">
<key column="id" />
<property name="name" type="string" column="name"
not-null="true" />

<property name="description" type="string"
column="description" not-null="false" />
<property name="dataSystem" type="string"
column="dataSystem" not-null="false" />

</join>
</subclass>

<!-- TEST CYCLE-->
<subclass name="TestCycle"
discriminator-value="TestCycle" abstract="true">
<join table="TestCycle">
<key column="id" />
<property name="number" type="integer" column="number"
not-null="true" unique="false" />

<property name="startDate" type="date"
column="startDate" not-null="true" />

<property name="endDate" type="date" column="endDate"
not-null="true" />
</join>
<!-- CYCLE TESTED-->
<subclass
name="CycleTested"
discriminator-value="CycleTested" />
<!-- CYCLE SELECTED-->
<subclass
name="CycleSelected"
discriminator-value="CycleSelected" />
</subclass>

<!-- TEST DEFINITION-->
<subclass
name="TestDefinition"
discriminator-value="TestDefinition">
<set name="tests" table="Test" inverse="true" cascade="all"
sort="unsorted">
<key column="testDefinitionId"></key>
<one-to-many
class="Test" />
</set>
<join table="TestDefinition">
<key column="id" />
<property name="testCode" type="string"
column="testCode" not-null="true" />

<property name="description" type="string"
column="description" not-null="false" />

<property name="testConfiguration" type="string"
column="testConfiguration" not-null="true" />
<many-to-one name="tester"
class="Tester" cascade="all"
outer-join="auto" column="testerId" not-null="true" />
</join>
</subclass>

<!-- TEST -->
<subclass name="Test"
discriminator-value="Test" abstract="true">
<join table="Test">
<key column="id" />
<property name="notes" type="string" column="notes"
not-null="false" />
<property name="ssdmsTestId" type="string"
column="ssdmsTestId" not-null="false" />
<property name="uniqueIdentifier" type="string"
column="uniqueIdentifier" not-null="true" />
<property name="testCategory" type="string"
column="testCategory" not-null="false" />
<many-to-one name="part"
class="Part" cascade="all"
outer-join="auto" column="partId" not-null="true" />
<many-to-one name="testDefinition"
class="TestDefinition"
cascade="all" outer-join="auto" column="testDefinitionId"
not-null="true" />
</join>
<!-- TEST BED BUILD TEST-->
<subclass
name="TestbedBuildTest"
discriminator-value="TestbedBuildTest" />
<!-- JTA BUILD TEST-->
<subclass
name="JTABuildTest"
discriminator-value="JTABuildTest" />
<!-- COMPONENT TEST-->
<subclass
name="ComponentTest"
discriminator-value="ComponentTest" />
<!-- DATES TEST-->
<subclass name="DATES"
discriminator-value="DATES" />
<!-- DI TEST-->
<subclass name="DITest"
discriminator-value="DITest" />
<!-- SYSTEM LEVEL TEST -->
<subclass
name="SystemLevelTest"
discriminator-value="SystemLevelTest" abstract="true">
<join table="SystemLevelTest">
<key column="id" />
<property name="testDate" type="date"
column="testDate" not-null="true" />
</join>
<!-- LAB TEST -->
<subclass
name="LabTest"
discriminator-value="LabTest">
<join table="LabTest">
<key column="id" />
<property name="testNumber" type="string"
column="testNumber" not-null="true" />

<property name="testAttempt" type="string"
column="testAttempt" not-null="true" />
</join>
</subclass>
<!-- FLIGHT TEST -->
<subclass
name="FlightTest" />
</subclass>
</subclass>
<!-- COMPONENT FAMILY -->
<subclass
name="ComponentFamily"
discriminator-value="ComponentFamily">
<set name="components" table="ComponentFamilyToComponent"
inverse="true" cascade="all" sort="unsorted">
<key column="componentFamilyId" />
<many-to-many
class="Component"
column="componentId" outer-join="auto" />
</set>
<join table="ComponentFamily">
<key column="id" />
<property name="name" type="string" column="name"
not-null="true" />

<property name="description" type="string"
column="description" not-null="true" />
</join>
</subclass>
<!-- PART -->
<subclass name="Part"
discriminator-value="Part" abstract="true">
<set name="tests" table="Test" inverse="true" cascade="all"
sort="unsorted">
<key column="partId"></key>
<one-to-many
class="Test" />
</set>
<join table="Part">
<key column="id"></key>
<property name="serialNumber" type="string"
column="serialNumber" not-null="true" />
<property name="partBaseNumber" type="string"
column="partBaseNumber" not-null="true" />
<property name="partNumberSuffix" type="string"
column="partNumberSuffix" not-null="false" />
<property name="mfgDate" type="date" column="mfgDate"
not-null="false" />
<property name="description" type="string"
column="description" not-null="false" />
<many-to-one name="unitTested"
class="UnitTested"
cascade="save-update" outer-join="auto" column="unitTestedId"
not-null="true">
</many-to-one>
</join>
<!-- TEST ASSEMBLY -->
<subclass
name="TestAssembly"
discriminator-value="TestAssembly" abstract="true">
<set name="testedComponents"
table="TestedComponentToTestAssembly" inverse="true" cascade="all"
sort="unsorted">

<key column="testAssemblyId" />

<many-to-many
class="TestedComponent"
column="testedComponentId" outer-join="auto" />

</set>


<join table="TestAssembly">
<key column="id" />
<many-to-one name="sampled"
class="Sampled"
cascade="all" outer-join="auto" column="sampledId"
not-null="false" />
</join>
<!-- JTA -->
<subclass name="JTA"
discriminator-value="JTA">
<join table="JTA">
<key column="id" />
<property name="frequencyDesignator"
type="string" column="frequencyDesignator" not-null="false" />

</join>
</subclass>
<!-- TESTBED -->
<subclass
name="Testbed"
discriminator-value="Testbed" />
<!-- TEL -->
<subclass
name="Tel"
discriminator-value="Tel" />
</subclass>

<!-- COMPONENT -->
<subclass
name="Component"
discriminator-value="Component">
<set name="componentFamilies"
table="ComponentFamilyToComponent" inverse="true" cascade="all"
sort="unsorted">

<key column="componentId" />

<many-to-many
class="ComponentFamily"
column="componentFamilyId" outer-join="auto" />

</set>
<join table="Component">
<key column="id" />
<property name="partDesignation" type="string"
column="partDesignation" not-null="true" />
<property name="mfgCode" type="string"
column="mfgCode" not-null="false" />
<property name="lotNumber" type="string"
column="lotNumber" not-null="false" />
</join>


<!-- TESTED COMPONENT -->
<subclass
name="TestedComponent"
discriminator-value="TestedComponent" />
<!-- SELECTED KEY COMPONENT -->
<subclass
name="SelectedKeyComponent"
discriminator-value="SelectedKeyComponent" >
<join table="SelectedKeyComponent">
<key column="id" />
<many-to-one name="part"
class="Part"
cascade="all" outer-join="auto" column="partId"
not-null="true"/>
</join>
</subclass>

</subclass>
<!-- SAMPLED -->
<subclass
name="Sampled"
discriminator-value="Sampled">
<set name="testAssemblies" table="TestAssembly"
inverse="true" cascade="save-update" sort="unsorted">

<key column="sampledId" />

<one-to-many
class="TestAssembly" />
</set>
<set name="keyComponents" table="SelectedKeyComponents"
inverse="true" cascade="save-update" sort="unsorted" >

<key column="partId" not-null="false" />

<one-to-many
class="SelectedKeyComponent" />
</set>

<join table="Sampled">
<key column="id" />
<property name="Program" type="string"
column="Program" not-null="true" />

<property name="Mod" type="string"
column="Mod" not-null="true" />

<property name="AltCode" type="string"
column="AltCode" not-null="false" />

<property name="keyAltNumbers" type="string"
column="keyAltNumbers" not-null="false" />

<property name="diScheduledDate" type="date"
column="diScheduledDate" not-null="false" />

<property name="diDate" type="date" column="diDate"
not-null="false" />



</join>
</subclass>
</subclass>


</class>

</hibernate-mapping>





Full stack trace of any exception that occurs:

java.sql.SQLException: [BEA][SQLServer JDBC Driver][SQLServer]Invalid column name 'partId'.
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRPCNonCursorExecuteRequest.submitPrepare(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRPCExecuteRequest.doPrepExec(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRPCExecuteRequest.execute(Unknown Source)
at weblogic.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at weblogic.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:124)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1197)
at org.hibernate.loader.Loader.doQuery(Loader.java:366)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:206)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1360)
at org.hibernate.loader.collection.OneToManyLoader.initialize(OneToManyLoader.java:107)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:488)
at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1353)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:170)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:47)
at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:133)
at MyApp.web.mbean.PreCycleEntryBean.keyComponentAlreadySaved(PreCycleEntryBean.java:400)
at MyApp.web.mbean.PreCycleEntryBean.mergeKeyComponents(PreCycleEntryBean.java:381)
at MyApp.web.mbean.PreCycleEntryBean.getSelectedKeyComponents(PreCycleEntryBean.java:359)
at MyApp.web.mbean.PreCycleEntryBean.displayUnitTestedDetail(PreCycleEntryBean.java:344)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:138)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:62)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at javax.faces.component.UIData.broadcast(UIData.java:583)
at org.apache.myfaces.component.html.ext.HtmlDataTable.broadcast(HtmlDataTable.java:323)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:110)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:184)
at org.apache.myfaces.lifeLifecycleImpl.invokeApplication(LifecycleImpl.java:271)
at org.apache.myfaces.lifeLifecycleImpl.execute(LifecycleImpl.java:102)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at MyApp.web.filter.SessionStateFilter.doFilter(SessionStateFilter.java:73)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)


Name and version of the database you are using: MS SQL Server 2000

The generated SQL (show_sql=true):
select keycompone0_.partId as partId__, keycompone0_.id as id__, keycompone0_.id as id0_, keycompone0_.testProgram as testProg3_0_0_, keycompone0_1_.serialNumber as serialNu2_10_0_, keycompone0_1_.partBaseNumber as partBase3_10_0_, keycompone0_1_.partNumberSuffix as partNumb4_10_0_, keycompone0_1_.mfgDate as mfgDate10_0_, keycompone0_1_.description as descript6_10_0_, keycompone0_1_.unitTestedId as unitTest7_10_0_, keycompone0_2_.partDesignation as partDesi2_14_0_, keycompone0_2_.mfgCode as mfgCode14_0_, keycompone0_2_.lotNumber as lotNumber14_0_, keycompone0_3_.partId as partId15_0_ from BusinessObject keycompone0_ inner join Part keycompone0_1_ on keycompone0_.id=keycompone0_1_.id inner join Component keycompone0_2_ on keycompone0_.id=keycompone0_2_.id inner join SelectedKeyComponent keycompone0_3_ on keycompone0_.id=keycompone0_3_.id where keycompone0_.partId=?


Debug level Hibernate log excerpt:
April 2006, id=7, number=1}
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - Dont need to execute flush
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - select unittested0_.id as id, unittested0_.testProgram as testProg3_0_, unittested0_1_.mainTestConfiguration as mainTest2_1_, unittested0_1_.testScheduleDate as testSche3_1_, unittested0_1_.materialType as material4_1_, unittested0_1_.notes as notes1_, unittested0_1_.testProgramType as testProg6_1_, unittested0_1_.outcome as outcome1_, unittested0_1_.source as source1_, unittested0_1_.selectedTestCycleId as selected9_1_, unittested0_1_.testedTestCycleId as testedT10_1_, unittested0_1_.sampledId as sampled11_1_, unittested0_1_.jtaId as jtaId1_, unittested0_1_.testbedId as testbedId1_ from BusinessObject unittested0_ inner join UnitTested unittested0_1_ on unittested0_.id=unittested0_1_.id where unittested0_.type='UnitTested' and unittested0_.testProgram=? and unittested0_1_.selectedTestCycleId=?
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - preparing statement
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - bindNamedParameters() 13 -> cycleSelectedId [2]
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - binding '13' to parameter: 2
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - bindNamedParameters() TestProgram_1 -> testProgram [1]
2005-04-14 16:53:23,497 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - binding 'TestProgram_1' to parameter: 1
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to open ResultSet (open ResultSets: 0, globally: 0)
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - processing result set
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - result set row: 0
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '36' as column: id
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - result row: EntityKey[UnitTested#36]
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - Initializing object from ResultSet: [UnitTested#36]
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - Hydrating entity: [UnitTested#36]
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'TestProgram_1' as column: testProg3_0_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: mainTest2_1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: testSche3_1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: material4_1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: notes1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'Lab' as column: testProg6_1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: outcome1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'Stockpile' as column: source1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '13' as column: selected9_1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: testedT10_1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '37' as column: sampled11_1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: jtaId1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: testbedId1_
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - done processing result set (1 rows)
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to close ResultSet (open ResultSets: 1, globally: 1)
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-04-14 16:53:23,507 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - closing statement
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - total objects hydrated: 1
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - resolving associations for [UnitTested#36]
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [CycleSelected#13]
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - entity found in session cache
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - attempting to resolve: [CycleSelected#13]
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - resolved object in session cache: [CycleSelected#13]
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [Sampled#37]
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - creating new proxy for entity
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - done materializing entity [UnitTested#36]
2005-04-14 16:53:23,517 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - initializing non-lazy collections
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - initializing proxy: [Sampled#37]
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - attempting to resolve: [Sampled#37]
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - object not resolved in any cache: [Sampled#37]
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - Materializing entity: [Sampled#37]
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [Sampled#37]
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - select sampled0_.id as id0_, sampled0_.testProgram as testProg3_0_0_, sampled0_1_.serialNumber as serialNu2_10_0_, sampled0_1_.partBaseNumber as partBase3_10_0_, sampled0_1_.partNumberSuffix as partNumb4_10_0_, sampled0_1_.mfgDate as mfgDate10_0_, sampled0_1_.description as descript6_10_0_, sampled0_1_.unitTestedId as unitTest7_10_0_, sampled0_2_.Program as Pr2_16_0_, sampled0_2_.Mod as Mod16_0_, sampled0_2_.AltCode as Al4_16_0_, sampled0_2_.keyAltNumbers as keyAltNu5_16_0_, sampled0_2_.diScheduledDate as diSchedu6_16_0_, sampled0_2_.diDate as diDate16_0_ from BusinessObject sampled0_ inner join Part sampled0_1_ on sampled0_.id=sampled0_1_.id inner join Sampled sampled0_2_ on sampled0_.id=sampled0_2_.id where sampled0_.id=?
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - preparing statement
2005-04-14 16:53:23,607 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - binding '37' to parameter: 1
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to open ResultSet (open ResultSets: 0, globally: 0)
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - processing result set
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - result set row: 0
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - result row: EntityKey[Sampled#37]
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - Initializing object from ResultSet: [Sampled#37]
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - Hydrating entity: [Sampled#37]
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'TestProgram_1' as column: testProg3_0_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '1234' as column: serialNu2_10_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '301516' as column: partBase3_10_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '00' as column: partNumb4_10_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: mfgDate10_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: descript6_10_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '36' as column: unitTest7_10_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'Program_1' as column: Pr2_16_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '1' as column: Mod16_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'abc' as column: Al4_16_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning '12234' as column: keyAltNu5_16_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: diSchedu6_16_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: diDate16_0_
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - done processing result set (1 rows)
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to close ResultSet (open ResultSets: 1, globally: 1)
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - closing statement
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - total objects hydrated: 1
2005-04-14 16:53:23,617 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - resolving associations for [Sampled#37]
2005-04-14 16:53:23,627 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - creating collection wrapper:[Part.tests#37]
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [UnitTested#36]
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - entity found in session cache
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - attempting to resolve: [UnitTested#36]
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - resolved object in session cache: [UnitTested#36]
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - creating collection wrapper:[Sampled.testAssemblies#37]
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - creating collection wrapper:[Sampled.keyComponents#37]
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - done materializing entity [Sampled#37]
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - initializing non-lazy collections
2005-04-14 16:53:23,637 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] DEBUG - done entity load
2005-04-14 16:53:26,041 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - opened session at timestamp: 4560974667943936
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - id unsaved-value: null
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - detached instance of: Sampled
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - merging detached instance
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [Sampled#37]
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - attempting to resolve: [Sampled#37]
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - object not resolved in any cache: [Sampled#37]
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - Materializing entity: [Sampled#37]
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [Sampled#37]
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - opening JDBC connection
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - select sampled0_.id as id0_, sampled0_.testProgram as testProg3_0_0_, sampled0_1_.serialNumber as serialNu2_10_0_, sampled0_1_.partBaseNumber as partBase3_10_0_, sampled0_1_.partNumberSuffix as partNumb4_10_0_, sampled0_1_.mfgDate as mfgDate10_0_, sampled0_1_.description as descript6_10_0_, sampled0_1_.unitTestedId as unitTest7_10_0_, sampled0_2_.Program as Pr2_16_0_, sampled0_2_.Mod as Mod16_0_, sampled0_2_.AltCode as Al4_16_0_, sampled0_2_.keyAltNumbers as keyAltNu5_16_0_, sampled0_2_.diScheduledDate as diSchedu6_16_0_, sampled0_2_.diDate as diDate16_0_ from BusinessObject sampled0_ inner join Part sampled0_1_ on sampled0_.id=sampled0_1_.id inner join Sampled sampled0_2_ on sampled0_.id=sampled0_2_.id where sampled0_.id=?
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - preparing statement
2005-04-14 16:53:26,051 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - binding '37' to parameter: 1
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - about to open ResultSet (open ResultSets: 0, globally: 0)
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - processing result set
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - result set row: 0
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - result row: EntityKey[Sampled#37]
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - Initializing object from ResultSet: [Sampled#37]
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - Hydrating entity: [Sampled#37]
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'TestProgram_1' as column: testProg3_0_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning '1234' as column: serialNu2_10_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning '301516' as column: partBase3_10_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning '00' as column: partNumb4_10_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: mfgDate10_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: descript6_10_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning '36' as column: unitTest7_10_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'Program_1' as column: Pr2_16_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning '1' as column: Mod16_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning 'abc' as column: Al4_16_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning '12234' as column: keyAltNu5_16_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: diSchedu6_16_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - returning null as column: diDate16_0_
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - done processing result set (1 rows)
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - about to close ResultSet (open ResultSets: 1, globally: 1)
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - closing statement
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - total objects hydrated: 1
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - resolving associations for [Sampled#37]
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - creating collection wrapper:[Part.tests#37]
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [UnitTested#36]
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - creating new proxy for entity
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - creating collection wrapper:[Sampled.testAssemblies#37]
2005-04-14 16:53:26,061 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - creating collection wrapper:[Sampled.keyComponents#37]
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - done materializing entity [Sampled#37]
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - initializing non-lazy collections
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - done entity load
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - processing cascade ACTION_MERGE for: Sampled
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - cascade ACTION_MERGE for collection: Part.tests
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - done cascade ACTION_MERGE for collection: Part.tests
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - done processing cascade ACTION_MERGE for: Sampled
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - id unsaved-value: null
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - loading entity: [UnitTested#36]
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - entity proxy found in session cache
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - initializing collection [Sampled.keyComponents#37]
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - checking second-level cache
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - collection not cached
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - batch loading collection: [Sampled.keyComponents#37]
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - select keycompone0_.partId as partId__, keycompone0_.id as id__, keycompone0_.id as id0_, keycompone0_.testProgram as testProg3_0_0_, keycompone0_1_.serialNumber as serialNu2_10_0_, keycompone0_1_.partBaseNumber as partBase3_10_0_, keycompone0_1_.partNumberSuffix as partNumb4_10_0_, keycompone0_1_.mfgDate as mfgDate10_0_, keycompone0_1_.description as descript6_10_0_, keycompone0_1_.unitTestedId as unitTest7_10_0_, keycompone0_2_.partDesignation as partDesi2_14_0_, keycompone0_2_.mfgCode as mfgCode14_0_, keycompone0_2_.lotNumber as lotNumber14_0_, keycompone0_3_.partId as partId15_0_ from BusinessObject keycompone0_ inner join Part keycompone0_1_ on keycompone0_.id=keycompone0_1_.id inner join Component keycompone0_2_ on keycompone0_.id=keycompone0_2_.id inner join SelectedKeyComponent keycompone0_3_ on keycompone0_.id=keycompone0_3_.id where keycompone0_.partId=?
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - preparing statement
2005-04-14 16:53:26,071 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - binding '37' to parameter: 1
2005-04-14 16:53:26,081 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-04-14 16:53:26,081 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - closing statement
2005-04-14 16:53:26,101 [ExecuteThread: '13' for queue: 'weblogic.kernel.Default'] DEBUG - could not initialize a collection: [Sampled.keyComponents#37] [select keycompone0_.partId as partId__, keycompone0_.id as id__, keycompone0_.id as id0_, keycompone0_.testProgram as testProg3_0_0_, keycompone0_1_.serialNumber as serialNu2_10_0_, keycompone0_1_.partBaseNumber as partBase3_10_0_, keycompone0_1_.partNumberSuffix as partNumb4_10_0_, keycompone0_1_.mfgDate as mfgDate10_0_, keycompone0_1_.description as descript6_10_0_, keycompone0_1_.unitTestedId as unitTest7_10_0_, keycompone0_2_.partDesignation as partDesi2_14_0_, keycompone0_2_.mfgCode as mfgCode14_0_, keycompone0_2_.lotNumber as lotNumber14_0_, keycompone0_3_.partId as partId15_0_ from BusinessObject keycompone0_ inner join Part keycompone0_1_ on keycompone0_.id=keycompone0_1_.id inner join Component keycompone0_2_ on keycompone0_.id=keycompone0_2_.id inner join SelectedKeyComponent keycompone0_3_ on keycompone0_.id=keycompone0_3_.id where keycompone0_.partId=?]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 11:05 am 
Beginner
Beginner

Joined: Thu Oct 16, 2003 7:30 am
Posts: 21
Location: Brussels
This has already been reported as a bug in a different context:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-36

and by the duplicate bug 263 (which is exactly this context).


Top
 Profile  
 
 Post subject: RE: Mixed inheritance hierarchy and lazy loading problem
PostPosted: Fri Apr 15, 2005 11:08 am 
Newbie

Joined: Thu Apr 14, 2005 6:26 pm
Posts: 4
I may have just firgured this out. Perhaps someone could tell me if this is an incorrect use of many-to-many mapping. Basically if a replace

<set name="keyComponents" table="SelectedKeyComponents"
inverse="true" cascade="save-update" sort="unsorted" >
<key column="partId" not-null="false" />
<one-to-many class="SelectedKeyComponent" />
</set>

with ...

<set name="keyComponents" table="SelectedKeyComponent"
inverse="true" cascade="save-update" sort="unsorted" >

<key column="partId" not-null="false" />
<many-to-many class="SelectedKeyComponent">
<column name="id"/>
</many-to-many>

</set>

the query runs. Though I need some more testing to make sure it's actually returning the values I'm expecting. Does anyone know why this work or even better whether or not this mapping may cause problems for me.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.