You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (JIRA)" <ji...@apache.org> on 2011/03/29 18:25:05 UTC
[jira] [Created] (OPENJPA-1968) SQLServerDictionery not using
DATETIME2 for jdbc driver other than MS JDBC driver
SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
---------------------------------------------------------------------------------
Key: OPENJPA-1968
URL: https://issues.apache.org/jira/browse/OPENJPA-1968
Project: OpenJPA
Issue Type: Bug
Components: sql
Affects Versions: 2.1.0, 2.1.1, 2.2.0
Reporter: Albert Lee
Assignee: Albert Lee
Fix For: 2.1.1, 2.2.0
Use of DATETIME2 db type for Date/Time/Timestamp should based on the SQLServer database version not driver type/vendor.
As a consequence, if version field is a Timestamp data type, you may get optimistic lock exception due to timestamp precision mismatch and hence update to entity may failed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OPENJPA-1968) SQLServerDictionery not using
DATETIME2 for jdbc driver other than MS JDBC driver
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee resolved OPENJPA-1968.
---------------------------------
Resolution: Fixed
> SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1968
> URL: https://issues.apache.org/jira/browse/OPENJPA-1968
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.1.1, 2.2.0
>
> Attachments: OPENJPA-1968.patch, TestDDTimestamp.java
>
>
> Use of DATETIME2 db type for Date/Time/Timestamp should based on the SQLServer database version not driver type/vendor.
> As a consequence, if version field is a Timestamp data type, you may get optimistic lock exception due to timestamp precision mismatch and hence update to entity may failed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Work started] (OPENJPA-1968) SQLServerDictionery not using
DATETIME2 for jdbc driver other than MS JDBC driver
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on OPENJPA-1968 started by Albert Lee.
> SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1968
> URL: https://issues.apache.org/jira/browse/OPENJPA-1968
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.1.1, 2.2.0
>
> Attachments: OPENJPA-1968.patch, TestDDTimestamp.java
>
>
> Use of DATETIME2 db type for Date/Time/Timestamp should based on the SQLServer database version not driver type/vendor.
> As a consequence, if version field is a Timestamp data type, you may get optimistic lock exception due to timestamp precision mismatch and hence update to entity may failed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENJPA-1968) SQLServerDictionery not using
DATETIME2 for jdbc driver other than MS JDBC driver
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee updated OPENJPA-1968:
--------------------------------
Attachment: OPENJPA-1968.patch
> SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1968
> URL: https://issues.apache.org/jira/browse/OPENJPA-1968
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.1.1, 2.2.0
>
> Attachments: OPENJPA-1968.patch
>
>
> Use of DATETIME2 db type for Date/Time/Timestamp should based on the SQLServer database version not driver type/vendor.
> As a consequence, if version field is a Timestamp data type, you may get optimistic lock exception due to timestamp precision mismatch and hence update to entity may failed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENJPA-1968) SQLServerDictionery not using
DATETIME2 for jdbc driver other than MS JDBC driver
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13013020#comment-13013020 ]
Albert Lee commented on OPENJPA-1968:
-------------------------------------
Even with the current changes in OpenJPA, one may still get the optimistic lock exception due to a problem in the DataDirect 4.2 jdbc driver. A case W103290127 was opened against DataDirect to get this fix. Attached is a test case that reproduce the problem for reference. The problem is openjpa attempts to perform an executeUpdate("DELETE/UPDATE") and the method returns 0 instead of 1 due to timestamp mismatch. As a result, openjpa translates this condition to an optimistic lock exception.
> SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1968
> URL: https://issues.apache.org/jira/browse/OPENJPA-1968
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.1.1, 2.2.0
>
> Attachments: OPENJPA-1968.patch
>
>
> Use of DATETIME2 db type for Date/Time/Timestamp should based on the SQLServer database version not driver type/vendor.
> As a consequence, if version field is a Timestamp data type, you may get optimistic lock exception due to timestamp precision mismatch and hence update to entity may failed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENJPA-1968) SQLServerDictionery not using
DATETIME2 for jdbc driver other than MS JDBC driver
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee updated OPENJPA-1968:
--------------------------------
Attachment: TestDDTimestamp.java
> SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1968
> URL: https://issues.apache.org/jira/browse/OPENJPA-1968
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.1.1, 2.2.0
>
> Attachments: OPENJPA-1968.patch, TestDDTimestamp.java
>
>
> Use of DATETIME2 db type for Date/Time/Timestamp should based on the SQLServer database version not driver type/vendor.
> As a consequence, if version field is a Timestamp data type, you may get optimistic lock exception due to timestamp precision mismatch and hence update to entity may failed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OPENJPA-1968) SQLServerDictionery not using
DATETIME2 for jdbc driver other than MS JDBC driver
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee closed OPENJPA-1968.
-------------------------------
> SQLServerDictionery not using DATETIME2 for jdbc driver other than MS JDBC driver
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-1968
> URL: https://issues.apache.org/jira/browse/OPENJPA-1968
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.1.1, 2.2.0
>
> Attachments: OPENJPA-1968.patch, TestDDTimestamp.java
>
>
> Use of DATETIME2 db type for Date/Time/Timestamp should based on the SQLServer database version not driver type/vendor.
> As a consequence, if version field is a Timestamp data type, you may get optimistic lock exception due to timestamp precision mismatch and hence update to entity may failed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira