-->
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: Hibernate Projections from a derived table result
PostPosted: Fri Jan 09, 2015 11:34 pm 
Newbie

Joined: Fri Jan 09, 2015 11:14 pm
Posts: 1
I have a DB view named 'view1'.
I have created the projections against this view, and projections include a derived column (derivedColumn1) also.
I use the criteria API to construct the WHERE clause and for creating projections

I need to know , is there any way in which we can construct the query given below using criteria API and projections

Code:
select
   *
   from
      (
         select
            col1, col2, col3 ,........ , derivedColumn1
         from 
            view1
         where
            [............. ]     //set of column names in WHERE clause
       }
   where  derivedColumn1 in (1,2,3)


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.