result « Entity « JPA Q&A





1. Multiple entity results with scalar result gives problem    forum.hibernate.org

I need some input, see the following example: (yes it is silly, but it is for clarity) The following works properly: SELECT {cst1.*} , {adr1.*} {cst2.*} , {adr3.*} FROM customer cst1 , address adr1 customer cst2 , address adr2 WHERE cst1.id = cst2.id sqlQuery.addEntity( 'cst1', Customer.class); sqlQuery.addJoin( 'adr1', 'cst1.address'); sqlQuery.addEntity( 'cst2', Customer.class); sqlQuery.addJoin( 'adr2', 'cst2.address' ); List list = sqlQuery.list() This ...