-->
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: Access to association aliases within criteria query API
PostPosted: Tue May 30, 2006 7:30 pm 
Newbie

Joined: Tue May 02, 2006 6:54 pm
Posts: 10
Location: Salt Lake City, Utah
I'd like to have a custom generic text search criteria extended from AbstractCriterion that would allow to search all string-based properties of an instance and its ASSOCIATIONS. Problem is that I couldn't find a way to access aliases for associactions so that LikeExpressions could be converted to sql string properly. Is it possible?
Example criteria query ignores associations, probably for this very same reason.

I may have used approach from documentation like,

IList results = session.CreateCriteria(typeof(Cat))
.Add( Example.Create(cat) )
.CreateCriteria("Mate")
.Add( Example.Create( cat.Mate ) )
.List()

but I want the type to be generic and my custom text search criteria to encapsulate associations.

Andre


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.