You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Daniel John Debrunner (JIRA)" <de...@geronimo.apache.org> on 2006/01/26 15:52:11 UTC
[jira] Created: (GERONIMO-1545) CMP update statements will cause
incorrect trigger firing in a database
CMP update statements will cause incorrect trigger firing in a database
-----------------------------------------------------------------------
Key: GERONIMO-1545
URL: http://issues.apache.org/jira/browse/GERONIMO-1545
Project: Geronimo
Type: Bug
Versions: 1.0
Reporter: Daniel John Debrunner
Priority: Critical
Regargless of the number of columns modified the UPDATE statement issued to the database logically updates all columns, though setting unmodified columns to the same value using the CASE statement. E.g.
UPDATE konto SET erzeugt = CASE WHEN ? THEN ? ELSE erzeugt END, bankname = CASE WHEN ? THEN ? ELSE bankname END, bankleitzahl = CASE WHEN ? THEN ? ELSE bankleitzahl END, kontonummer = CASE WHEN ? THEN ? ELSE kontonummer END, kontostand = CASE WHEN ? THEN ? ELSE kontostand END, fk_person = CASE WHEN ? THEN ? ELSE fk_person END WHERE guid = ?
This will cause any update triggers to be fired, even those on the un-modified columns. This, I think, is not the expected behaviour when an application only modifies, for example, a customer's balance, but the CMP UPDATE will also fire the send-email on address change trigger.
This form of UPDATE can also be very inefficient on some databases.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (GERONIMO-1545) CMP update statements will cause
incorrect trigger firing in a database
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-1545?page=all ]
Gianny Damour resolved GERONIMO-1545:
-------------------------------------
Fix Version: 1.0.1
Resolution: Fixed
This is now fixed.
The optional flag <static-sql> can be used to control the way a CMP is
updated. By default, an UPDATE statement is dynamically generated each time
that a CMP needs to be persisted. This statement only updates the columns
which have been updated during the transaction. This strategy avoids
triggers to be incorrectly fired.
When <static-sql> is set, a single UPDATE statement is generated whatever
the CMP fields to be actually updated. This was the previous strategy.
> CMP update statements will cause incorrect trigger firing in a database
> -----------------------------------------------------------------------
>
> Key: GERONIMO-1545
> URL: http://issues.apache.org/jira/browse/GERONIMO-1545
> Project: Geronimo
> Type: Bug
> Versions: 1.0
> Reporter: Daniel John Debrunner
> Assignee: Gianny Damour
> Priority: Critical
> Fix For: 1.0.1
>
> Regargless of the number of columns modified the UPDATE statement issued to the database logically updates all columns, though setting unmodified columns to the same value using the CASE statement. E.g.
> UPDATE konto SET erzeugt = CASE WHEN ? THEN ? ELSE erzeugt END, bankname = CASE WHEN ? THEN ? ELSE bankname END, bankleitzahl = CASE WHEN ? THEN ? ELSE bankleitzahl END, kontonummer = CASE WHEN ? THEN ? ELSE kontonummer END, kontostand = CASE WHEN ? THEN ? ELSE kontostand END, fk_person = CASE WHEN ? THEN ? ELSE fk_person END WHERE guid = ?
> This will cause any update triggers to be fired, even those on the un-modified columns. This, I think, is not the expected behaviour when an application only modifies, for example, a customer's balance, but the CMP UPDATE will also fire the send-email on address change trigger.
> This form of UPDATE can also be very inefficient on some databases.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (GERONIMO-1545) CMP update statements will cause
incorrect trigger firing in a database
Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
[ http://issues.apache.org/jira/browse/GERONIMO-1545?page=all ]
Gianny Damour reassigned GERONIMO-1545:
---------------------------------------
Assign To: Gianny Damour
> CMP update statements will cause incorrect trigger firing in a database
> -----------------------------------------------------------------------
>
> Key: GERONIMO-1545
> URL: http://issues.apache.org/jira/browse/GERONIMO-1545
> Project: Geronimo
> Type: Bug
> Versions: 1.0
> Reporter: Daniel John Debrunner
> Assignee: Gianny Damour
> Priority: Critical
>
> Regargless of the number of columns modified the UPDATE statement issued to the database logically updates all columns, though setting unmodified columns to the same value using the CASE statement. E.g.
> UPDATE konto SET erzeugt = CASE WHEN ? THEN ? ELSE erzeugt END, bankname = CASE WHEN ? THEN ? ELSE bankname END, bankleitzahl = CASE WHEN ? THEN ? ELSE bankleitzahl END, kontonummer = CASE WHEN ? THEN ? ELSE kontonummer END, kontostand = CASE WHEN ? THEN ? ELSE kontostand END, fk_person = CASE WHEN ? THEN ? ELSE fk_person END WHERE guid = ?
> This will cause any update triggers to be fired, even those on the un-modified columns. This, I think, is not the expected behaviour when an application only modifies, for example, a customer's balance, but the CMP UPDATE will also fire the send-email on address change trigger.
> This form of UPDATE can also be very inefficient on some databases.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira