persistence@glassfish.java.net

Re: JPQL: fix unqualified field access in UPDATE/DELETE queries

From: Tom Ware <tom.ware_at_oracle.com>
Date: Fri, 10 Nov 2006 10:04:49 -0500

Hi Michael,

  Just one comment.

  - Could you please add some javadoc for the new methods. In an effort
to make TopLink Essentials more understandable to new contributers, we
are going to try to gradually increase the level of internal
documentation. One step towards that is to ensure all new methods
contain fairly descriptive javaodc.

-Tom

Michael Bouschen wrote:

>Hi Tom, hi Jielin,
>
>attached you find my changes to fix issue 1382: "Error on unqualified
>field access in bulk UPDATE and DELETE":
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1382
>
>The current compiler throws an exception for the following query:
> UPDATE Customer SET name = 'CHANGED' WHERE name = 'Michael Bouschen'
>It cannot resolve the access of field name in the WHERE clause.
>
>The fix is to qualify any field access using the abstract schema name as
>variable name. I added a method to the superclass of the parse tree
>nodes that is called for UPDATE/DELETE queries and replaces an
>unqualified attribute access by a DotNode.
>
>Regards Michael
>
>
>

-- 
Tom Ware
Principal Software Engineer
Oracle Canada Inc.
Direct: (613) 783-4598
Email: tom.ware_at_oracle.com