[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2172) Could not determine fecht owner exception with 3.2.0GA (worked in 3.2rc2)
Alexander Rupsch (JIRA)
noreply at atlassian.com
Sat Jan 20 07:42:44 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2172?page=comments#action_25866 ]
Alexander Rupsch commented on HHH-2172:
---------------------------------------
The problem is solved, it seems that hibernate 3.2.xGA pays attention to the order of the return-join and the return-alias tags.
this works:
<return alias="goe" class="com.ecg.mts.tsm.impl.domain.MasterDataEdge"/>
<return-join alias="child" property="goe.child"/>
this does not:
<return-join alias="child" property="goe.child"/>
<return alias="goe" class="com.ecg.mts.tsm.impl.domain.MasterDataEdge"/>
Well, interesting change. You can close the issue.
kind regards
> Could not determine fecht owner exception with 3.2.0GA (worked in 3.2rc2)
> -------------------------------------------------------------------------
>
> Key: HHH-2172
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2172
> Project: Hibernate3
> Type: Bug
> Versions: 3.2.0.ga
> Environment: Annotations 3.2.0GA (16.10.06)
> Core 3.2.0GA (16.10.06)
> Reporter: Alexander Rupsch
>
>
> HI,
> I have a named query like this:
> <sql-query name="loadMDGraphJoined-AllPathFromAndToChildSlow">
> <return-join alias="parent" property="goe.parent"/>
> <return-join alias="child" property="goe.child"/>
> <return alias="goe" class="com.ecg.mts.tsm.impl.domain.MasterDataEdge"/>
> <![CDATA[
> select
> pa.id AS {parent.id},
> pa.periodstart AS {parent.validPeriod.start},
> pa.periodend AS {parent.validPeriod.end},
> pa.shortdesc AS {parent.shortDesc},
> pa.longdesc AS {parent.longDesc},
> pa.name AS {parent.name},
> pa.class AS {parent.class},
> pa.clientid AS {parent.clientId},
> ch.id AS {child.id},
> ch.periodstart AS {child.validPeriod.start},
> ch.periodend AS {child.validPeriod.end},
> ch.shortdesc AS {child.shortDesc},
> ch.longdesc AS {child.longDesc},
> ch.name AS {child.name},
> ch.class AS {child.class},
> ch.clientid AS {child.clientId},
> goe.parent_id AS {goe.parent},
> goe.child_id AS {goe.child},
> goe.id AS {goe.id}
> from tsm_master_data pa, tsm_master_data ch,
> (select DISTINCT ROWID, goe.* from tsm_master_data_edge goe
> start with parent_id in (
> ( /* Selection der Pfade nach "oben" */
> SELECT DISTINCT goe2.parent_id
> FROM tsm_master_data_edge goe2
> START WITH goe2.child_id = :parentId
> OR goe2.child_id IN ((SELECT DISTINCT child_id
> FROM tsm_master_data_edge
> START WITH parent_id = :parentId
> CONNECT BY PRIOR parent_id = child_id))
> CONNECT BY PRIOR goe2.parent_id = goe2.child_id
> )
> ) or parent_id = :parentId
> connect by prior goe.child_id = goe.parent_id) goe
> where pa.id = goe.parent_id
> and ch.id = goe.child_id
> ]]>
> </sql-query>
> And I call it like this (using spring):
> List items = getHibernateTemplate().findByNamedQueryAndNamedParam(
> "loadMDGraphJoined-AllPathFromAndToChildSlow", "parentId", id);
> This works fine with Core 3.2.0rc2 and annotations 3.2.0rc1. After switching to 3.2.0GA I got the following exception:
> org.springframework.orm.hibernate3.HibernateSystemException: Could not determine fetch owner : null; nested exception is org.hibernate.HibernateException: Could not determine fetch owner : null
> org.hibernate.HibernateException: Could not determine fetch owner : null
> at org.hibernate.loader.custom.CustomLoader.determineAppropriateOwnerPersister(CustomLoader.java:250)
> at org.hibernate.loader.custom.CustomLoader.<init>(CustomLoader.java:150)
> at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1688)
> at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
> at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:150)
> at org.springframework.orm.hibernate3.HibernateTemplate$35.doInHibernate(HibernateTemplate.java:947)
> at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
> at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:938)
> at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:928)
> at com.ecg.mts.tsm.impl.persistence.HibernateMasterDataRepository.getMasterDataGraphComplete(HibernateMasterDataRepository.java:116)
> at com.ecg.mts.tsm.test.persistence.MasterDataRepositoryTestBase.testGetMasterDataGraphComplete(MasterDataRepositoryTestBase.java:201)
> at com.ecg.mts.tsm.test.persistence.hibernate.HibernateMasterDataRepositoryTest.testGetMasterDataGraphComplete(HibernateMasterDataRepositoryTest.java:39)
> 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:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> The variable "entityName" in CustomerLoader.determineAppropriateOwnerPersister() ist null because the parameter ownerDescriptor ist null. This is because EntityFetchReturn.getOwner also returns null at line 146.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list