alex
Milen Dyankov wrote:
Matthew Hixson wrote:
On Tuesday, September 30, 2003, at 12:30 AM, Milen Dyankov wrote:
Matthew Hixson wrote:
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@
Yes I can do that. But that is still SQL query that can not be rewritten in EJB-QL. My point was that one can not make use of CMPs for doing this.
I think a EJB-QL finder like this will work with JBoss.
select object(o) from table_name o order by o.ddate desc limit 1
Have you tried it? -M@
Yes I have. This is what I have got:
==================================================
...
org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "ORDER" at line 1, column 34.
Was expecting one of:
<EOF>
"," ...
)
...
==================================================
May be I got it wrong, but as far as I remember there was nothing about "ORDER BY" or "LIMIT" in EJB-QL docs.
Moreover, part of our application uses "PervasiveSQL" and there is no equivalent of MySQL's "LIMIT" or MSSQL's "TOP".
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
