From: <ste...@us...> - 2006-02-08 18:49:19
|
Update of /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17856/test/org/hibernate/test/hql Modified Files: Tag: Branch_3_1 ASTParserLoadingTest.java Log Message: HHH-1464 : Query.getReturnTypes() / getReturnAliases() Index: ASTParserLoadingTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.java,v retrieving revision 1.51 retrieving revision 1.51.2.1 diff -u -d -r1.51 -r1.51.2.1 --- ASTParserLoadingTest.java 27 Jan 2006 23:40:31 -0000 1.51 +++ ASTParserLoadingTest.java 8 Feb 2006 18:49:11 -0000 1.51.2.1 @@ -67,6 +67,16 @@ }; } + public void testQueryMetadataRetrievalWithFetching() { + // HHH-1464 : there was a problem due to the fact they we polled + // the shallow version of the query plan to get the metadata. + Session s = openSession(); + Query query = s.createQuery( "from Animal a inner join fetch a.mother" ); + assertEquals( 1, query.getReturnTypes().length ); + assertNull( query.getReturnAliases() ); + s.close(); + } + public void testSuperclassPropertyReferenceAfterCollectionIndexedAccess() { // note: simply performing syntax checking in the db // test for HHH-429 |