You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "David Schmitz (JIRA)" <ji...@apache.org> on 2011/01/25 11:24:44 UTC

[jira] Created: (OPENJPA-1929) ValueHandlers try to immediately write even though one is only reading

ValueHandlers try to immediately write even though one is only reading
----------------------------------------------------------------------

                 Key: OPENJPA-1929
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1929
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 2.0.1
         Environment: any
            Reporter: David Schmitz


We have implemented an own ValueHandler by inheriting from AbstractValueHandler. 

If one reads from a query inside a transaction from a database, OpenJPA calls the handler (toDataStoreValue) of the unmodified query objects trying to write back to the database on commit, even though nothing has been manipulated.

The writting can only be avoided when leaving out the transaction block. 

This is no correct JPA behaviour as it should be possible to do read-only data processing within a JPA transaction.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-1929) ValueHandlers try to immediately write even though one is only reading

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986404#action_12986404 ] 

Rick Curtis commented on OPENJPA-1929:
--------------------------------------

Can you post a unit test showing this behavior?

Thanks,
Rick

> ValueHandlers try to immediately write even though one is only reading
> ----------------------------------------------------------------------
>
>                 Key: OPENJPA-1929
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1929
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.0.1
>         Environment: any
>            Reporter: David Schmitz
>
> We have implemented an own ValueHandler by inheriting from AbstractValueHandler. 
> If one reads from a query inside a transaction from a database, OpenJPA calls the handler (toDataStoreValue) of the unmodified query objects trying to write back to the database on commit, even though nothing has been manipulated.
> The writting can only be avoided when leaving out the transaction block. 
> This is no correct JPA behaviour as it should be possible to do read-only data processing within a JPA transaction.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.