Quote:
Mutiple questions arise:
1: Are Multiple entity results combined with scalar results allowed? If yes what am I doing wrong.
2: What is the use of an resulttransformer if the alias array has no longer te same index as the values array.
I guess this is a bug? Maybe the one causing the inrcorect behaviour of above?
Problem 1 is solved: The order of adding entities and their joins seems to be of influence, the addEntities have to be declared before the addJoins.
sqlQuery.addEntity( 'cst1', Customer.class );
sqlQuery.addEntity( 'cst2', Customer.class );
sqlQuery.addJoin( 'adr1', 'cst1.address' );
sqlQuery.addJoin( 'adr2', 'cst2.address' );
sqlQuery.addScalar( 'ed', Hibernate.String );
Problem 2 is still a mystery to me, If I add a scalar result the tuples[] and the aliases[] in the result set do not longer match....