The findByAge(Inteter) one works fine by itself? I.e., you verfied that the syntax is valid for Integers but not Objects? What's the SQL-type/JDBC-type your CMP POJO class is mapped as?

Dave



"Rupp,Heiko" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

06/05/2003 12:00 PM
Please respond to jboss-user

       
        To:        "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
        cc:        
        Subject:        RE: [JBoss-user] EJB-QL Finder and POJO



David,

> Whoops, I totally misunderstood your question (obviously). The spec

:)

> says that EJB-QL operates on "abstract schema types." I would imagine
> that, for DVCs (which is what we're talking about here, right?) the

Yes.

> abstract schema type is just "Object." I don't see anything in the spec
> which contradicts it, and it does explicitly say that Serializeable
> dependant value classes can be CMP-fields.

Yes, that is no problem. The reality looks like this:

17:56:27,700 INFO  [EntityOne] Created table 'TESTTABLE_ONE' successfully.
17:56:27,710 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement
'SELE
CT Object(o) FROM EntityOne AS o WHERE o.pojo=?1'; - nested throwable:
(org.jbos
s.ejb.plugins.cmp.ejbql.ParseException: Encountered "o.pojo" at line 1,
column 4
6.
Was expecting one of:
   "NOT" ...

With the following finder:

* @ejb.finder
*                  signature="java.util.Collection findByPojo(java.lang.Object pojo)"
*                  query="SELECT Object(o) FROM EntityOne AS o WHERE o.pojo=?1"
*
* @ejb.finder
*  signature="java.util.Collection findByAge(java.lang.Integer age)"
*                  query="SELECT Object(o) FROM EntityOne AS o WHERE o.age=?1"

When I change java.lang.Object to com.acme.POJO, the error stays
the same.

Thanks
 Heiko
--
Bancotec GmbH      EMail: [EMAIL PROTECTED]
Calwer Str. 33     Telefon: +49 711 222 992 900
D-70173 Stuttgart  Telefax: +49 711 222 992 999
Ein Unternehmen der Cellent AG http://www.cellent.de/


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to