-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Complicated Hql query problem.
PostPosted: Thu Mar 17, 2005 3:19 pm 
Newbie

Joined: Tue Jan 25, 2005 5:05 pm
Posts: 17
Hi. I need to implement searching in product catalog. For example I have 2 classes:

class Category
{
public int Id; public Category Parent; public String Name; public IList ChildCategories;
}

class Product
{
public int Id; public String Name; public Category Category;
}

How to retrieve products in category which id I know and products in all child categories with infinity nesting.

Ex: query like: "select from Product p where p.Category.Id = 5 and p.Name like '%hiber%'" - it will retrieve products only in category with id = 5. But how to retrieve products in all child categories?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.