RE: [JBoss-user] Help with JBossQL

2004-01-16 Thread Alexey Loubyansky
It was introduced in 3.2.2. 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Luis
> Sent: Friday, January 16, 2004 5:32 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-user] Help with JBossQL
> 
> I have implemented a dynamic query using xdoclet as
> follows:
> 
> 1. @ejb.finder
> query=""
> signature="java.util.Collection
> findMaxId(java.lang.String sql,java.lang.Obj[] args)"
> 
> 2. @jboss.query
>signature="java.util.Collection
> findMaxId(java.lang.String sql,java.lang.Obj[] args)"
>dynamic="true"
> 
> 
> in the client the call is:
> 
> findMaxId("SELECT MAX(a.id) FROM Marca as a",new Object[0]);
> 
> When I try to use this I get an error: 
> 
> ERROR[STDERR] javax.ejb.FinderException: Error compiling ejbql:
> org.jboss.ejb.plugins.cmp.ejbql.ParseException:
> Encountered "MAX" at line 1, col 8.
> Was expecting one of:
>"DISTINCT"
>"OBJECT"...
> 
> I am using jboss 3.2.1. Can anybody tell me what is wrong 
> here, I would appreciate a lot your help.



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Help with JBossQL

2004-01-16 Thread Luis
I have implemented a dynamic query using xdoclet as
follows:

1. @ejb.finder
query=""
signature="java.util.Collection
findMaxId(java.lang.String sql,java.lang.Obj[] args)"

2. @jboss.query
   signature="java.util.Collection
findMaxId(java.lang.String sql,java.lang.Obj[] args)"
   dynamic="true"


in the client the call is:

findMaxId("SELECT MAX(a.id) FROM Marca as a",new
Object[0]);

When I try to use this I get an error: 

ERROR[STDERR] javax.ejb.FinderException: Error
compiling ejbql:
org.jboss.ejb.plugins.cmp.ejbql.ParseException:
Encountered "MAX" at line 1, col 8.
Was expecting one of:
   "DISTINCT"
   "OBJECT"...

I am using jboss 3.2.1. Can anybody tell me what is
wrong here, I would appreciate a lot your help.


--- Alexey  Loubyansky <[EMAIL PROTECTED]> wrote:
> JBossQL  supports MAX function in SELECT that takes
> a CMP field as an
> agrument. Hence, you should use ejbSelect.
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On
> Behalf Of Luis
> > Sent: Wednesday, January 14, 2004 3:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: [JBoss-user] Help with JBossQL
> > 
> > Hi everyone,I am trying to write a JBossQL query
> to get the 
> > entity with the maximun value of a certain field.
> Something 
> > similar to the SQL function MAX() but I can't get
> it to work. 
> > Can anybody tell me the right way to do this. 
> > 
> > Thanks in advance.
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes 
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> > 
> > 
> >
>
---
> > This SF.net email is sponsored by: Perforce
> Software.
> > Perforce is the Fast Software Configuration
> Management System 
> > offering advanced branching capabilities and
> atomic changes 
> > on 50+ platforms.
> > Free Eval!
> http://www.perforce.com/perforce/loadprog.html
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> >
>
https://lists.sourceforge.net/lists/listinfo/jboss-user
> > 
> > 
> 
> 
>
---
> This SF.net email is sponsored by: Perforce
> Software.
> Perforce is the Fast Software Configuration
> Management System offering
> advanced branching capabilities and atomic changes
> on 50+ platforms.
> Free Eval!
> http://www.perforce.com/perforce/loadprog.html
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/jboss-user


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Help with JBossQL

2004-01-15 Thread Alexey Loubyansky
JBossQL  supports MAX function in SELECT that takes a CMP field as an
agrument. Hence, you should use ejbSelect.

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Luis
> Sent: Wednesday, January 14, 2004 3:56 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] Help with JBossQL
> 
> Hi everyone,I am trying to write a JBossQL query to get the 
> entity with the maximun value of a certain field. Something 
> similar to the SQL function MAX() but I can't get it to work. 
> Can anybody tell me the right way to do this. 
> 
> Thanks in advance.
> 
> __
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes 
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
> 
> ---
> This SF.net email is sponsored by: Perforce Software.
> Perforce is the Fast Software Configuration Management System 
> offering advanced branching capabilities and atomic changes 
> on 50+ platforms.
> Free Eval! http://www.perforce.com/perforce/loadprog.html
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user