-->
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.  [ 2 posts ] 
Author Message
 Post subject: question about disjunction between 2 associated objects
PostPosted: Tue Feb 07, 2006 3:44 pm 
Newbie

Joined: Mon Feb 06, 2006 6:18 pm
Posts: 3
Hi,
I am using Hiberate 2.1.8 and criteria api to write a search screen.
I think Criteria API is good in this scenario by avoiding a lot of dynamic hql concatenation. But now I tried to do something like:

Object A contains Object B (you can get B by A.B)
A has an attribute name
B has an attribute title
A and B are associated with A.id = B.id

One of the search criteria is

A.name = 'input search string'
or A.B.title = 'input search string'

I cannot find a way to use criteria query(conjunction or disjunction) since A and B are not in the same level. I saw several postings on similar subject before but haven't see a clear answer for Hibernate 2. My question is this at all possible in Hibernate 2? If so, how?

Thank you in advance!

-Jimmy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 4:03 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
this is the tools forum - please go to the normal user forum. thanks.

_________________
Max
Don't forget to rate


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.