-->
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.  [ 3 posts ] 
Author Message
 Post subject: SELECT: can this be done with Criteria API?
PostPosted: Sun Jun 21, 2009 2:57 pm 
Newbie

Joined: Sun Jan 13, 2008 6:48 am
Posts: 16
Hi Community,

i have a question regarding random selection of rows from a MSSQL server.

In SQL-code , i can write:
Code:
   SELECT TOP 1 column FROM table
   ORDER BY NEWID()

to select a random row from the table.

Unfortunately, i seems like this type of query can't be done with criteria API?

Regards


Top
 Profile  
 
 Post subject: Re: SELECT: can this be done with Criteria API?
PostPosted: Fri Jun 26, 2009 9:02 am 
Newbie

Joined: Sun Jan 13, 2008 6:48 am
Posts: 16
I don't know if this is the correct forum-section? Perhaps someone of the Mods. can move this question into the Standard-Hibernate-API?


Top
 Profile  
 
 Post subject: Re: SELECT: can this be done with Criteria API?
PostPosted: Fri Jun 26, 2009 9:14 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
I don't think that's possible. I suggest you post your question here:

http://groups.google.com/group/nhusers?hl=en

_________________
--Wolfgang


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.