Could you do something like this for findLastDelivery:

select ddate from foo where bar=?1 order by ddate desc limit 1

You could do pretty much the same thing for finding the biggest order too.
-M@


On Monday, September 29, 2003, at 02:39 AM, Milen Dyankov wrote:

Hi all,

Is there a way to find CMP by highest/lowest value of given field?

Say something like:

findLastDelivery(); // ... where ddate = SELECT max (ddate) ...
findBiggestOrder(); // ... where amount = SELECT max (amount) ...

It looks like it can not be done with EJB-QL.

Should I go for SLSB + JDBC for this?


Best regards,


Milen Dyankov



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to