Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPQL: iterator on several entities

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit 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

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

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

It will be a List of Object[]. First element will be Catalogue instance, second element - Product instance, third element - Article instance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic