-->
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: random function HQL
PostPosted: Tue Apr 25, 2006 11:48 am 
Newbie

Joined: Tue Apr 18, 2006 9:57 am
Posts: 18
Exists some function random() ? like in postgres.
if i want to used the function random of postgres, how is the procedure?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 26, 2006 12:44 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
There isn't a random() funciton in HQL, but random() is defined in the PostgreSQL dialect file, so you should be able to use it. What dialect are you using? If it's not PostgreSQLDialect, then you'll have to register the SQL function in your dialect. Have a look at PostgreSQLDialect's constructor for function registration code.


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.