hibernate - Java HQL how to access objects after using a join -


trying understand using joins hql.

def result=food.findall('from mealitems m, nutrition n m.food=n.food); 

the result returns, i'm not understanding how/what returns.
can access nutrition object on each result?

for(row in result){      var ntr=row.nutrition;      println ntr.calories;    }  

suggest should read on hibernate.

it transforms result set list of object arrays. utimately if able map result corresponding classes so.

have @ these links. should how hibernate works hql query if transformer not explicit declared

http://levelup.lishman.com/hibernate/hql/joins.php


Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -