I am learning Hibernate, and i am having problem with the join. The problem is that, the query return an List of Objects and i don't know how i must manage it
This is the code:
Query query = session.createQuery("select p.id, p.pokemon, t.types from Pokedex as p JOIN p.assPokTypes t where p.id = '001'");
List lista = query.list();
for(Object row:lista) {
System.out.println(row);
}
This is the table structure:
Pokedex (ID, pokemon)
AssPokTypes (id_pokemon, id_type, primary_type)
Thanks