This content has been marked as final.
Show 2 replies
-
1. Re: random selection with ejbql
fhh Apr 9, 2007 8:34 AM (in response to merabi)entityManager.createNativeQuery("SELECT * FROM <my_entity_table>", MyEntity.class).getResultList();
Work for me!
Regards
Felix -
2. Re: random selection with ejbql
merabi Apr 9, 2007 9:42 AM (in response to 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...)