From 5dc9cd1a17e8dbf1b1137dd7f8ef7f0aed365160 Mon Sep 17 00:00:00 2001 From: Moritz Becker Date: Tue, 21 Jul 2020 17:59:56 +0200 Subject: [PATCH] [#841] Oracle fixes --- .../testsuite/entity/JsonDocument.java | 55 ------------------- .../testsuite/entity/JsonDocument.java | 5 +- .../base/AbstractPersistenceTest.java | 2 +- 3 files changed, 5 insertions(+), 57 deletions(-) delete mode 100644 core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/JsonDocument.java rename core/testsuite/src/main/{basic => java}/com/blazebit/persistence/testsuite/entity/JsonDocument.java (95%) diff --git a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/JsonDocument.java b/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/JsonDocument.java deleted file mode 100644 index 3c466b78c4..0000000000 --- a/core/testsuite/src/main/hibernate/com/blazebit/persistence/testsuite/entity/JsonDocument.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2014 - 2020 Blazebit. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.blazebit.persistence.testsuite.entity; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - -/** - * @author Moritz Becker - * @since 1.5.0 - */ -@Entity -@Table(name = "json_document") -public class JsonDocument { - private Long id; - @Column(nullable = false, columnDefinition = "text") - private String content; - - public JsonDocument(Long id, String content) { - this.id = id; - this.content = content; - } - - @Id - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } -} diff --git a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/entity/JsonDocument.java b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JsonDocument.java similarity index 95% rename from core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/entity/JsonDocument.java rename to core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JsonDocument.java index 3c466b78c4..03485777b2 100644 --- a/core/testsuite/src/main/basic/com/blazebit/persistence/testsuite/entity/JsonDocument.java +++ b/core/testsuite/src/main/java/com/blazebit/persistence/testsuite/entity/JsonDocument.java @@ -28,9 +28,11 @@ @Table(name = "json_document") public class JsonDocument { private Long id; - @Column(nullable = false, columnDefinition = "text") private String content; + public JsonDocument() { + } + public JsonDocument(Long id, String content) { this.id = id; this.content = content; @@ -45,6 +47,7 @@ public void setId(Long id) { this.id = id; } + @Column(nullable = false) public String getContent() { return content; } diff --git a/testsuite-base/hibernate/src/main/java/com/blazebit/persistence/testsuite/base/AbstractPersistenceTest.java b/testsuite-base/hibernate/src/main/java/com/blazebit/persistence/testsuite/base/AbstractPersistenceTest.java index 4d770aa0be..ab2de0b344 100644 --- a/testsuite-base/hibernate/src/main/java/com/blazebit/persistence/testsuite/base/AbstractPersistenceTest.java +++ b/testsuite-base/hibernate/src/main/java/com/blazebit/persistence/testsuite/base/AbstractPersistenceTest.java @@ -142,7 +142,7 @@ protected Properties applyProperties(Properties properties) { } } else if (isHibernate5() && properties.get("javax.persistence.jdbc.url").toString().contains("oracle")) { // Apparently the dialect resolver doesn't choose the latest dialect - properties.put("hibernate.dialect", "org.hibernate.dialect.Oracle12cDialect"); + properties.put("hibernate.dialect", "org.hibernate.dialect.Oracle10gDialect"); } if (useHbm2ddl()) {