persistence@glassfish.java.net

Re: Patch fixing issues with UPDATE and constructor EJBQL queries

From: Shelly (Donna) McGowan <"Shelly>
Date: Fri, 18 Nov 2005 10:55:18 -0500

Michael,

The fixes for both the arithmetic expressions in the SET clause of an
UPDATE statement and a EJB QL query using a constructor expression in
the select clause seemed to have been resolved with the patch applied.

Shelly



Michael Bouschen wrote On 11/18/05 08:45,:
> Hi Tom, hi Shelly,
>
> attached you find a patch for two EJBQL issues:
>
> (1) An EJBQL constructor query fails in the container because the EJBQL
> compiler cannot find the constructor class. The same query works in a
> J2SE environment. I talked to Tom and Sahoo and both think using the
> thread context class loader should work for dynamic queries. Sahoo and I
> are not sure about named queries, we do not know when they are compiled
> and whether the context class loader is set in this environment.
> Tom, do you know?
>
> (2) The EJBQLParser does not accept an arithmetic expression in the SET
> clause of an UPDATE statement:
> UPDATE Employee e SET e.salary = e.salary * 10.0.
> I changed the corresponding rule in the EJBQLParser.
>
> The attached jar includes the changed source and the class files, such
> that it can be used as a patch.
>
> Tom,
> please have a look at the source changes.
>
> Shelly,
> please try the patch and let me know whether it works on your side.
>
> Thanks!
>
> Regards Michael
>