You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Adriano Crestani (JIRA)" <tu...@ws.apache.org> on 2008/03/26 16:31:24 UTC

[jira] Commented: (TUSCANY-2139) When updating the PK it builds the wrong WHERE clause

    [ https://issues.apache.org/jira/browse/TUSCANY-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582318#action_12582318 ] 

Adriano Crestani commented on TUSCANY-2139:
-------------------------------------------

Hi René,

The patch seems out of date. I think you need to update your trunk and regenerate tha patch. Then attach the patch again ; )

Thanks,
Adriano Crestani

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org