Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

JPQL: iterator on several entities

Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a little question about JPQL, I am trying to find the best way to do it.

I want to iterate on a list made of 3 entities :

I have not looked precisely yet, but what does resultats contain exactly in that case ?

{((Catalogue1), (Product1), (Article1)), ((Catalogue2), (Product2), (Article2)), � } ???

I want to produce the following table :

Name of Catalogue � Name of Product � Name of Article
nameCat1 nameProd1 nameArt1
nameCat2 nameProd2 nameArt2
nameCat3 nameProd3 nameArt3

nameCatalogue : Catalogue.getName() �
nameProduct : Product.getName() �
nameArticle : Article.getName() �

[ November 05, 2008: Message edited by: Celinio Fernandes ]
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It will be a List of Object[]. First element will be Catalogue instance, second element - Product instance, third element - Article instance.
What's that smell? Hey, sniff this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic