[jboss-user] [EJB 3.0] - Re: random selection with ejbql

2007-04-09 Thread merabi
thanks for the reply, but I still need to know if EJBQL allows random selection 
from the record.

for example, MySQL allows query:

select * from Table1 order by rand() limit 5;

I've searched half a day if EJBQL can do sucha thing but found no info.

Is there anyway I can select random records using EJBQL?

(My boss doesn't wanna use createNativeQuery. That make it more though...)


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035707#4035707

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035707
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: random selection with ejbql

2007-04-09 Thread fhh

  | entityManager.createNativeQuery("SELECT * FROM ", 
MyEntity.class).getResultList();
  | 

Work for me!

Regards

Felix

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035695#4035695

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035695
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user