Hi,
I'm trying to create a query to return me 3 random rows from a table. Obviously, I can
set up my query like this:
<framework:entity-query name="randomPageImagesSmall">
| <framework:ejbql>from PageImage</framework:ejbql>
| <framework:order>RAND()</framework:order>
| </framework:entity-query>
and then just take the first 3 records.. but what I'd like to do is just return 3 rows
(i.e. analagous to SQL: LIMIT 3), as this saves reading the whole lot from the DB..
any advice greatly appreciated.
cheers
phil
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091074#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...