[hibernate-dev] Old vs. New Query Translators?

Steve Ebersole steve at hibernate.org
Wed Sep 5 15:30:55 EDT 2007


On Wednesday 05 September 2007 02:14:55 pm James Carman wrote:
> For new functionality (such as HHH-16), do we need to make sure it
> works the "old" way?  I added a test case to HqlTest:
>
> public void testExplicitJoinOnUnrelatedClasses() {
>   // HHH-16: Explicit joins on unrelated classes
>   assertTranslation("from Human h join Pet p on p.name = h.name");
> }
>
> The assertTranslation() method runs the query through both the old and
> the new QueryTranslator implementations.  The AST-based query
> translator works for me now that I've altered the ANTLR grammar, but
> the old one doesn't work (for obvious reasons).  In order to get this
> stuff working, we need to fix both the old and the new ones?
>
> James
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

It would not make sense for the old translator to understand this 
functionality.  

Such brand new features and syntaxes that the old translator did not 
comprehend are not tested in org.hibernate.test.hql.HQLTest, but in 
org.hibernate.test.hql.ASTParserLoadingTest.  Have a look there.



More information about the hibernate-dev mailing list