Bugs item #556644, was opened at 2002-05-16 01:24
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=556644&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Bill Burke (patriot1burke)
Assigned to: Dain Sundstrom (dsundstrom)
Summary: Bugs in EJB QL

Initial Comment:
Maybe you don't support any comparison operators:
=, >, >=, <, <=, <>?

Used this
        <ejb-ql>
            <![CDATA[
            SELECT OBJECT( r ) FROM Reservation r
            WHERE (r.amountPaid * .01) > 300.00
            ]]>
        </ejb-ql>

Got the following error in deployment:

org.jboss.ejb.plugins.cmp.ejbql.ParseException: 
Encountered ">" at line 4, column 40.
Was expecting one of:
    "BETWEEN" ...
    "NOT" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...

*****************************

IN and NOT IN operator seem to return exactly opposite 
what they should.  I have 4 customers in either GA or 
MA:

            SELECT OBJECT( c ) FROM Customer c
            WHERE c.homeAddress.state IN ('GA', 'MA') 

This returns nobody when it should return 4 customers.

            SELECT OBJECT( c ) FROM Customer c
            WHERE c.homeAddress.state NOT IN 
('GA', 'MA')

This returns everybody. When it should only return 1 
customer.
Seems the SQL is not being generated properly in the 
IN statement.  There are commas missing in between the 
states.

SELECT t0_c.ID FROM CUSTOMER t0_c, ADDRESS 
t1_c_homeAddress WHERE t1_c_homeAddress.STATE IN
('GA''MA') AND (t0_c.homeAddress=t1_c_homeAddress.ID) 

SELECT t0_c.ID FROM CUSTOMER t0_c, ADDRESS 
t1_c_homeAddress WHERE t1_c_homeAddress.STATE NOT IN
('GA''MA') AND (t0_c.homeAddress=t1_c_homeAddress.ID) 

******************************
The following query fails:
SELECT OBJECT( crs ) FROM Cruise crs
WHERE crs.reservations IS NOT EMPTY

reservations is a relationship.

     [java] javax.ejb.FinderException: Find failed: 
java.sql.SQLException: General error in statement 
[SELECT t0_crs.ID
FROM CRUISE t0_crs, RESERVATION t1_crs_reservations 
WHERE TRUE AND (t0_crs.ID=t1_crs_reservations.cruise)]
     [java]     at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand
.execute(JDBCAbstractQueryCommand.java:143)
     [java]     at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.
execute(JDBCFindEntitiesCommand.java:40)
     [java]     at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEnt
ities(JDBCStoreManager.java:471)
     [java]     at 
org.jboss.ejb.plugins.CMPPersistenceManager.findEntitie
s(CMPPersistenceManager.java:348)
     [java]     at 
org.jboss.resource.connectionmanager.CachedConnectionIn
terceptor.findEntities(CachedConnectionInterce
ptor.java:284)


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=556644&group_id=22866

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to