Update of /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17923/test/org/hibernate/test/hql
Modified Files:
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.52
diff -u -d -r1.51 -r1.52
--- ASTParserLoadingTest.java 27 Jan 2006 23:40:31 -0000 1.51
+++ ASTParserLoadingTest.java 8 Feb 2006 18:49:26 -0000 1.52
@@ -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
|