Hi Bruce,
Its seems that the fully qualified Class name is being broken into individual 
tokens, which is why (eventually) order is returned as a keyword in an 
unexpected location.
I got mine to work (seems ok so far but I haven't completed testing it) by 
continuing to consume characters until I encounter a whitespace or its the 
end of the query string . I modified the identifier method of the Lexer class 
since the idea (i guess) is to identfiy tokens based on word boundries.

So for example my query was broken down into the following tokens 
===original===
select
o
from
nz
co
softmetaware
commerce
bo
order <--- and there in lies the problem
o

====modified===
select
o
from
nz.co.softmetaware.commerce.bo.order
o

which seems to work fine. Oh and I had the Class name wrong in the example I 
sent below, sorry :-)

Jeff

On Fri, 1 Feb 2002 18:15, Jeff Hoare wrote:
> Hi Bruce,
> Here is the OQLQuery:
> OQLQuery _oql = _db.getOQLQuery("SELECT o from
> nz.co.softmetaware.commerce.Order o");
>
> And here is the mapping
> <!--  Mapping for Orders  -->
>   <class name="nz.co.softmetaware.commerce.bo.Order"
>          identity="OID" >
>     <description>Orders</description>
>     <map-to table="orders"/>
>     <field name="OID" type="integer" get-method="jdoGetID"
> set-method="jdoSetID" >
>       <sql name="oid" type="integer"/>
>     </field>
>     <field name="orderedDate" type="date" get-method="jdoGetOrderedDate"
> set-method="jdoSetOrderedDate" >
>       <sql name="order_date" type="date" dirty="check" />
>     </field>
>     <field name="paymentDate" type="date" get-method="jdoGetPaymentDate"
> set-method="jdoSetPaymentDate" >
>       <sql name="payment_date" type="date" dirty="check" />
>     </field>
>     <field name="shipDate" type="date" get-method="jdoGetShipDate"
> set-method="jdoSetShipDate" >
>       <sql name="ship_date" type="date" dirty="check" />
>     </field>
>     <!--
>     <field name="customer" type="nz.co.softmetaware.commerce.bo.Customer"
> get-method="jdoGetCustomer" set-method="jdoSetCustomer" >
>       <sql name="customer_oid" />
>     </field>
>     -->
>     <field name="hasShipped" type="string" get-method="jdoGetHasShipped"
> set-method="jdoSetHasShipped" >
>       <sql name="has_shipped" type="char" dirty="check" />
>     </field>
>   </class>
>
> Jeff
>
> On Fri, 1 Feb 2002 04:22, Bruce Snyder wrote:
> > This one time, at band camp, Jeff Hoare said:
> >
> > JH >refers to an invalid token type (46 need 2).
> >
> > Jeff,
> >
> > Yep, Castor is telling you that it is finding the ORDER keyword
> > where it should be finding an IDENTIFIER. This seems very odd
> > behavior, though, because the object is fully qualified with the
> > package name. Can  you post the section of your mapping descriptor
> > that describes the a.b.Order object?
> >
> > Bruce
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to