-->
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: advanced Hibernate Criteria API, 3 joins + new column....
PostPosted: Thu Nov 05, 2009 2:25 pm 
Regular
Regular

Joined: Thu Sep 16, 2004 4:56 pm
Posts: 80
I need to return every 5th row(customers review only every nth entry) like the following but along with a whole bunch of property restrictions that I already have working...

http://www.iknowkungfoo.com/blog/index. ... Nth-Record

I was thinking I need to do this with Projections or something as it basically adds a temporary row column to be used in a later restriction...anyone know how to do this?

I would hate to revert back to putting the sql string together especially as it could open us up to sql injection attacks as some of these may come from url params later.

thanks,
Dean

_________________
The list of compelling reasons to reduce the estimate does not include you simply wishing it would take less time - Unknown


Top
 Profile  
 
 Post subject: Re: advanced Hibernate Criteria API, 3 joins + new column....
PostPosted: Fri Nov 06, 2009 11:02 am 
Regular
Regular

Joined: Thu Sep 16, 2004 4:56 pm
Posts: 80
hmmm, I guess that is not really a join, but I wasn't thinking yesterday. It is really a subselect in the from clause to narrow the results of the table generated by the first select statement. Is there a way to do that in criteria api?

Is there extension points in the api?

_________________
The list of compelling reasons to reduce the estimate does not include you simply wishing it would take less time - Unknown


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