-->
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: Multiple aliases
PostPosted: Mon Jun 04, 2007 4:58 pm 
Newbie

Joined: Thu Oct 26, 2006 4:02 pm
Posts: 12
Hi all,

I'm having an issue with writing a "real world" criteria query. What I'm trying to do is create a query across several relationships. I'll use a Northwind example for clarity sake. I want a list of all the Customers that have and order for a product in a given category, or have an order for a product from a given supplier.

I've tried doing this with aliases, but I can't get an alias to work beyond one level of the relationship. I've also tried doing this by creating a new criteria object for every relationship, but I can't get that to work with the "Or" expression.

So really I have two questions.
1) Is there anyway that I can build an alias so that I can write this?
Code:
Expression.Eq("Orders.OrderDetails.Products.Categories.Name", "Auto Parts")

2) Is there anyway that I can build an OrExpression with two ICriterion from different sub-ICriterias?

Thanks in advance,
Matt


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.