persistence@glassfish.java.net

RE: JPQL: fix for UPDATE with subquery (issue 592)

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Wed, 17 May 2006 15:09:18 -0400

Hello Michael,
   This looks good, please check it in.
--Gordon

-----Original Message-----
From: Michael.Bouschen_at_Sun.COM [mailto:Michael.Bouschen_at_Sun.COM]On
Behalf Of Michael Bouschen
Sent: Tuesday, May 16, 2006 4:36 PM
To: tom.ware_at_oracle.com; gordon.yorke_at_oracle.com;
andrei.ilitchev_at_oracle.com
Cc: persistence_at_glassfish.dev.java.net
Subject: JPQL: fix for UPDATE with subquery (issue 592)


Hi Tom, hi Gordon, hi Andrei,

attached you find a fix for glassfish issue 592: UPDATE with subquery
updates too many rows.
https://glassfish.dev.java.net/issues/show_bug.cgi?id=592

During validation the query compiler calculates the set of
identification variables that need to be joined between the subquery and
the outer query. Unfortunately, this call was omitted for an update
query. Thus the set was empty and no joins were generated.

The first jar includes the fix, the second jar adds new test cases to
the entity-persistence-tests module.

Regards Michael