[
https://issues.apache.org/jira/browse/TUSCANY-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
René de Bloois updated TUSCANY-2139:
------------------------------------
Patch Info: [Patch Available]
Added patch.
> When updating the PK it builds the wrong WHERE clause
> -----------------------------------------------------
>
> Key: TUSCANY-2139
> URL: https://issues.apache.org/jira/browse/TUSCANY-2139
> Project: Tuscany
> Issue Type: Bug
> Components: Java DAS RDB
> Environment: Version is Java-DAS-1.0-beta2 (wasn't an available
> choice in the "Affects Version/s" select box)
> Reporter: René de Bloois
> Priority: Blocker
> Attachments: TUSCANY-2139.patch
>
>
> I updated the CODE and the ID column (ID is the PK) and get the following
> logging:
> DEBUG 11:06:49,524 org.apache.tuscany.das.rdb.impl.Statement
> | Executing statement update TICK_CLIENT set CODE = ?, ID = ?
> where ID = ? and CODE = ? and ID = ?
> DEBUG 11:06:49,524 org.apache.tuscany.das.rdb.impl.Statement
> | Setting parameter 1 to test6
> DEBUG 11:06:49,524 org.apache.tuscany.das.rdb.impl.Statement
> | Setting parameter 2 to test6
> DEBUG 11:06:49,524 org.apache.tuscany.das.rdb.impl.Statement
> | Setting parameter 3 to test6
> DEBUG 11:06:49,524 org.apache.tuscany.das.rdb.impl.Statement
> | Setting parameter 4 to test5
> DEBUG 11:06:49,524 org.apache.tuscany.das.rdb.impl.Statement
> | Setting parameter 5 to test
> So the ID is put twice in the WHERE clause with different values (the old
> value and the new). This will never update a record and results in:
> org.apache.tuscany.das.rdb.exception.OptimisticConcurrencyException: An
> update collision occurred
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]