[jboss-user] [JBoss Seam] - entity query

minamti do-not-reply at jboss.com
Tue Nov 20 21:56:04 EST 2007

I am trying to create a data table with pagination. However my problem is that I would rather use the entity query defined in components.xml. 

My query is somewhat like this 

select itemDetail from Item item, ItemDetail itemDetail where item.itemId = itemDetail.id.itemId and item.expiryDate > :adate and item.userId = :currUser and itemDetail.id.itemDetailDate = (select max(i.id.itemDetailDate) from ItemDetail i where i.id.itemId = itemDetail.id.itemId)

The aDate and currUser is coming from an object.

If I have this query in a session bean and use the @Factory annotation to get the List, it works fine in a data Table. 

Can I formulate the ejbql and restrcitions (including the subquery) ?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106587#4106587

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106587

More information about the jboss-user mailing list