Bugs item #835596, was opened at 2003-11-04 10:51
Message generated for change (Comment added) made by letiemble
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=835596&group_id=22866

Category: JBossCMP
Group: v3.2
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Panagiotis Korros (pkorros)
>Assigned to: Laurent Etiemble (letiemble)
Summary: Can't use ORDER BY for boolean cmp fields

Initial Comment:
When i try to execute the following EJB-QL statement:

SELECT OBJECT( o ) FROM Position o  ORDER BY o.organic ASC

I get the following error:

javax.ejb.FinderException: Error compiling ejbql:
org.jboss.ejb.plugins.cmp.ejbql.ParseException:
Encountered "o.organic" at line 1, column 48.
Was expecting one of:
    <NUMERIC_VALUED_PATH> ...
    <STRING_VALUED_PATH> ...
    <DATETIME_VALUED_PATH> ...
    
        at
org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.execute(JDBCDynamicQLQuery.java:92)
        at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
        at
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:91)
        at
org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
        at
orgchart.ejb.PositionCMP$Proxy.ejbSelectGeneric(<generated>)

o.organic is a Boolean CMP Field of Position bean.



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

>Comment By: Laurent Etiemble (letiemble)
Date: 2003-11-10 10:23

Message:
Logged In: YES 
user_id=437455

You can always post a RFE for that. The CMP lead will then
decide.


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

Comment By: Panagiotis Korros (pkorros)
Date: 2003-11-10 10:13

Message:
Logged In: YES 
user_id=552526

You are right. Thanks for this clarrification. You may close
this bug report or implement it as a Jboss-ql extra feature.

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

Comment By: Laurent Etiemble (letiemble)
Date: 2003-11-07 15:29

Message:
Logged In: YES 
user_id=437455

Here is what I found in the EJB specs 2.1.

Chapter 11.2.7.2 :
"Arguments to the functions MAX and MIN must correspond to
orderable cmp-field types (i.e., numeric types, string
types, character types, or date types)."

Chapter 11.2.8 :
"In the first two cases, each orderby_item must be an
orderable cmp-field of the entity bean abstract
schema type value returned by the SELECT clause. In the
third case, the orderby_itemmust evaluate to
the same cmp-field of the same entity bean abstract schema
type as the cmp_path_expression in the
SELECT clause."

Chapter 11.2.12 :
"Boolean comparison is restricted to = and <>."

These paragraphs seems to indicate that a boolean value
cannot be used in the ORDER BY clause as boolean fields are
not considered as orderable cmp_field. In this case,
orderable means comparable and boolean values are not
comparable.

Any suggestions ?


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

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


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to