我正在使用
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
从https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server-support-matrix?view=sql-server-2017,我选择了以下版本的JDBC驱动程序:
com.microsoft.sqlserver:mssql-jdbc: 6.2.2.jre8
环境:
org.springframework.data:spring-data-jpa:2.0.9.RELEASE
org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final
org.hibernate:hibernate-entitymanager:5.2.17.Final
Java version: 1.8.0_91, vendor: Oracle Corporation
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
org.javers:javers-spring-jpa:3.11.6
但是我遇到SQLServerException:当我尝试使用
更新实体时,'OFFSET'附近的语法不正确@JaversSpringDataAuditable
@Repository
public interface Users1Repository extends JpaRepository<Users1,Long>
org.polyjdbc.core.exception.QueryExecutionException: [SELECT_ERROR] Failed to run select query:
SELECT state, type, version, changed_properties, managed_type, commit_pk, author, commit_date, commit_id, g.local_id, g.fragment, g.owner_id_fk, o.local_id owner_local_id, o.fragment owner_fragment, o.type_name owner_type_name FROM jv_snapshot INNER JOIN jv_commit ON commit_pk = commit_fk INNER JOIN jv_global_id g ON g.global_id_pk = global_id_fk LEFT OUTER JOIN jv_global_id o ON o.global_id_pk = g.owner_id_fk WHERE snapshot_pk = 2200
ORDER BY snapshot_pk desc OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
at org.polyjdbc.core.query.TransactionalQueryRunner.queryCollection(TransactionalQueryRunner.java:93)
在调试过程中,我发现以下代码正在插入 OFFSET 子句,该子句已在SQL Server 2012
中引入org.polyjdbc.core.dialect.MsSqlDialectQueries.limit(Query, Limit, boolean)
我的问题:
Javers是否完全支持SQL Server 2008?
在哪里可以获得javers和数据库版本之间的兼容性矩阵?
答案 0 :(得分:1)
JaVers在SQL Server版本之间没有区别,它会为最新版本生成SQL。因此不支持SQL Server 2008。