Version 8



    Since 3.2.4


    In JBoss-3.2.X, JBossCMP is not EJB2.1 compliant. But since 3.2.4 you can use EJBQL2.1 for finders and ejbSelect methods. Just write an EJBQL2.1 compliant query in ejb-jar.xml.


    Note: only EJBQLToSQL92Compiler is fully EJBQL2.1 compatible. JDBCEJBQLCompiler compiler could not pass some EJBQL2.1 tests because of the way it JOINs tables.


    Adde functionality in EJBQL2.1:


    • ORDER BY clause

    EJB QL ::= select_clause from_clause [where_clause] [orderby_clause]


    • IN expression

    cmp_path_expression [NOT] IN ( {literal |input_parameter} [, {literal | input_parameter}]* )


    The cmp_path_expression can now have a numeric value in addition to string. Parameters can now appear in the IN clause.


    • LIKE expression

    cmp_path_expression [NOT] LIKE pattern_value [ESCAPEescape_character]


    The pattern_value can now be a string valued input parameter. The escape_character can now be a character-valued input parameter.


    • Null Comparison Expression

    {single_valued_path_expression | input_parameter } IS [NOT ] NULL


    Can now check the input parameter for NULL value.


    • Functional Expressions


    Added arithmetic function MOD(int, int) which returns int.


    • Aggregate Functions In Select Expression

    select_clause ::=SELECT [DISTINCT ] {select_expression | OBJECT (identification_variable)}
    select_expression ::= single_valued_path_expression | aggregate_select_expression
    aggregate_select_expression ::= {AVG |MAX |MIN |SUM |COUNT }( [DISTINCT ] cmp_path_expression) | COUNT ( [DISTINCT ] identification_variable | single_valued_cmr_path_expression)


    writen by ibraheem bala'awee