Remove OpenJPA leftovers.

Remove unused tests, simplify findAllById(Iterable) implementation.

Closes #3741
This commit is contained in:
Mark Paluch
2025-01-09 14:35:49 +01:00
parent d2abc6176f
commit 0d46e05362
21 changed files with 14 additions and 595 deletions

View File

@@ -290,7 +290,6 @@
</includes>
<excludes>
<exclude>**/*UnitTests.java</exclude>
<exclude>**/OpenJpa*</exclude>
<exclude>**/EclipseLink*</exclude>
<exclude>**/MySql*</exclude>
<exclude>**/Postgres*</exclude>

View File

@@ -19,20 +19,17 @@ import static org.springframework.data.jpa.repository.query.QueryUtils.*;
import jakarta.persistence.EntityManager;
import jakarta.persistence.LockModeType;
import jakarta.persistence.Parameter;
import jakarta.persistence.Query;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaDelete;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.CriteriaUpdate;
import jakarta.persistence.criteria.ParameterExpression;
import jakarta.persistence.criteria.Path;
import jakarta.persistence.criteria.Predicate;
import jakarta.persistence.criteria.Root;
import jakarta.persistence.criteria.Selection;
import java.io.Serial;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -262,7 +259,7 @@ public class SimpleJpaRepository<T, ID> implements JpaRepositoryImplementation<T
/*
* Some JPA providers require {@code ids} to be a {@link Collection} so we must convert if it's not already.
*/
Collection<ID> idCollection = toCollection(ids);
Collection<ID> idCollection = toCollection(ids);
query.setParameter("ids", idCollection);
applyQueryHints(query);
@@ -426,10 +423,14 @@ public class SimpleJpaRepository<T, ID> implements JpaRepositoryImplementation<T
Collection<ID> idCollection = toCollection(ids);
ByIdsSpecification<T> specification = new ByIdsSpecification<>(entityInformation);
TypedQuery<T> query = getQuery(specification, Sort.unsorted());
TypedQuery<T> query = getQuery((root, q, criteriaBuilder) -> {
return query.setParameter(specification.parameter, idCollection).getResultList();
Path<?> path = root.get(entityInformation.getIdAttribute());
return path.in(idCollection);
}, Sort.unsorted());
return query.getResultList();
}
@Override
@@ -1083,37 +1084,6 @@ public class SimpleJpaRepository<T, ID> implements JpaRepositoryImplementation<T
return total;
}
/**
* Specification that gives access to the {@link Parameter} instance used to bind the ids for
* {@link SimpleJpaRepository#findAllById(Iterable)}. Workaround for OpenJPA not binding collections to in-clauses
* correctly when using by-name binding.
*
* @author Oliver Gierke
* @see <a href="https://issues.apache.org/jira/browse/OPENJPA-2018?focusedCommentId=13924055">OPENJPA-2018</a>
*/
@SuppressWarnings("rawtypes")
private static final class ByIdsSpecification<T> implements Specification<T> {
private static final @Serial long serialVersionUID = 1L;
private final JpaEntityInformation<T, ?> entityInformation;
@Nullable ParameterExpression<Collection<?>> parameter;
ByIdsSpecification(JpaEntityInformation<T, ?> entityInformation) {
this.entityInformation = entityInformation;
}
@Override
@SuppressWarnings("unchecked")
public Predicate toPredicate(Root<T> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
Path<?> path = root.get(entityInformation.getIdAttribute());
parameter = (ParameterExpression<Collection<?>>) (ParameterExpression) cb.parameter(Collection.class);
return path.in(parameter);
}
}
/**
* {@link Specification} that gives access to the {@link Predicate} instance representing the values contained in the
* {@link Example}.
@@ -1122,12 +1092,8 @@ public class SimpleJpaRepository<T, ID> implements JpaRepositoryImplementation<T
* @author Christoph Strobl
* @since 1.10
*/
private static class ExampleSpecification<T> implements Specification<T> {
private static final @Serial long serialVersionUID = 1L;
private final Example<T> example;
private final EscapeCharacter escapeCharacter;
private record ExampleSpecification<T>(Example<T> example,
EscapeCharacter escapeCharacter) implements Specification<T> {
/**
* Creates new {@link ExampleSpecification}.
@@ -1135,13 +1101,11 @@ public class SimpleJpaRepository<T, ID> implements JpaRepositoryImplementation<T
* @param example the example to base the specification of. Must not be {@literal null}.
* @param escapeCharacter the escape character to use for like expressions. Must not be {@literal null}.
*/
ExampleSpecification(Example<T> example, EscapeCharacter escapeCharacter) {
private ExampleSpecification {
Assert.notNull(example, EXAMPLE_MUST_NOT_BE_NULL);
Assert.notNull(escapeCharacter, "EscapeCharacter must not be null");
this.example = example;
this.escapeCharacter = escapeCharacter;
}
@Override

View File

@@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.test.context.ContextConfiguration;
/**
* Metamodel tests using OpenJPA.
* Metamodel tests using Eclipselink.
*
* @author Oliver Gierke
*/

View File

@@ -1,42 +0,0 @@
/*
* Copyright 2013-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.infrastructure;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.test.context.ContextConfiguration;
/**
* Metamodel tests using OpenJPA.
*
* @author Oliver Gierke
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaMetamodelIntegrationTests extends MetamodelIntegrationTests {
@Test
@Disabled
@Override
void canAccessParametersByIndexForNativeQueries() {}
/**
* TODO: Remove once https://issues.apache.org/jira/browse/OPENJPA-2618 is fixed.
*/
@Test
@Disabled
@Override
void doesNotExposeAliasForTupleIfNoneDefined() {}
}

View File

@@ -1,24 +0,0 @@
/*
* Copyright 2014-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository;
import org.springframework.test.context.ContextConfiguration;
/**
* @author Oliver Gierke
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaEntityGraphRepositoryMethodsIntegrationTests extends EntityGraphRepositoryMethodsIntegrationTests {}

View File

@@ -1,87 +0,0 @@
/*
* Copyright 2008-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.ParameterExpression;
import jakarta.persistence.criteria.Root;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.data.jpa.domain.sample.User;
import org.springframework.data.jpa.repository.sample.UserRepository;
import org.springframework.test.context.ContextConfiguration;
/**
* Testcase to run {@link UserRepository} integration tests on top of OpenJPA.
*
* @author Oliver Gierke
* @author Jens Schauder
* @author Krzysztof Krason
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaNamespaceUserRepositoryTests extends NamespaceUserRepositoryTests {
@PersistenceContext EntityManager em;
@Test
void checkQueryValidationWithOpenJpa() {
assertThatThrownBy(() -> em.createQuery("something absurd")).isInstanceOf(RuntimeException.class);
assertThatThrownBy(() -> em.createNamedQuery("not available")).isInstanceOf(RuntimeException.class);
}
/**
* Test case for https://issues.apache.org/jira/browse/OPENJPA-2018
*/
@SuppressWarnings({ "rawtypes" })
@Test
@Disabled
void queryUsingIn() {
flushTestUsers();
CriteriaBuilder builder = em.getCriteriaBuilder();
CriteriaQuery<User> criteriaQuery = builder.createQuery(User.class);
Root<User> root = criteriaQuery.from(User.class);
ParameterExpression<Collection> parameter = builder.parameter(Collection.class);
criteriaQuery.where(root.<Integer> get("id").in(parameter));
TypedQuery<User> query = em.createQuery(criteriaQuery);
query.setParameter(parameter, Arrays.asList(1, 2));
List<User> resultList = query.getResultList();
assertThat(resultList).hasSize(2);
}
/**
* Temporarily ignored until openjpa works with hsqldb 2.x.
*/
@Override
void shouldFindUsersInNativeQueryWithPagination() {}
}

View File

@@ -1,27 +0,0 @@
/*
* Copyright 2013-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository;
import org.junit.jupiter.api.Disabled;
import org.springframework.test.context.ContextConfiguration;
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaParentRepositoryIntegrationTests extends ParentRepositoryIntegrationTests {
@Override
@Disabled
void testWithJoin() {}
}

View File

@@ -1,33 +0,0 @@
/*
* Copyright 2016-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository;
import org.springframework.context.annotation.ImportResource;
import org.springframework.test.context.ContextConfiguration;
/**
* Testcase to run {@link RepositoryWithIdClassKeyTests} integration tests on top of OpenJPA.
*
* @author Mark Paluch
*/
@ContextConfiguration
class OpenJpaRepositoryWithCompositeKeyIntegrationTests extends RepositoryWithIdClassKeyTests {
@ImportResource({ "classpath:infrastructure.xml", "classpath:openjpa.xml" })
static class TestConfig extends Config {
}
}

View File

@@ -1,35 +0,0 @@
/*
* Copyright 2015-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository;
import org.junit.jupiter.api.Disabled;
import org.springframework.context.annotation.ImportResource;
import org.springframework.test.context.ContextConfiguration;
/**
* Test case to run {@link StoredProcedureIntegrationTests} integration tests on top of OpenJpa. This is currently not
* supported since, the OpenJPA tests need to be executed with hsqldb1 which doesn't supported stored procedures.
*
* @author Thomas Darimont
* @author Oliver Gierke
*/
@Disabled
@ContextConfiguration(classes = { StoredProcedureIntegrationTests.Config.class })
class OpenJpaStoredProcedureIntegrationTests extends StoredProcedureIntegrationTests {
@ImportResource({ "classpath:infrastructure.xml", "classpath:openjpa.xml" })
static class TestConfig extends Config {}
}

View File

@@ -1,33 +0,0 @@
/*
* Copyright 2011-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository;
import org.junit.jupiter.api.Disabled;
import org.springframework.test.context.ContextConfiguration;
/**
* Ignores some test cases using IN queries as long as we wait for fix for
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=349477.
*
* @author Oliver Gierke
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaUserRepositoryFinderTests extends UserRepositoryFinderTests {
@Disabled
@Override
void findsByLastnameIgnoringCaseLike() {}
}

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.data.jpa.repository;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.*;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
@@ -32,6 +32,7 @@ import java.util.List;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.data.jpa.domain.sample.User;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
@@ -45,7 +46,6 @@ import org.springframework.transaction.annotation.Transactional;
@ExtendWith(SpringExtension.class)
@ContextConfiguration({ "classpath:application-context.xml"
// , "classpath:eclipselink.xml"
// , "classpath:openjpa.xml"
})
@Transactional
class SimpleJpaParameterBindingTests {

View File

@@ -803,9 +803,6 @@ class UserRepositoryTests {
assertThat(repository.findByActiveFalse()).containsOnly(firstUser);
}
/**
* Ignored until the query declaration is supported by OpenJPA.
*/
@Test
void executesAnnotatedCollectionMethodCorrectly() {
@@ -1618,11 +1615,7 @@ class UserRepositoryTests {
assertThat(repository.deleteByLastname("dorfuaeB")).isEmpty();
}
/**
* @see <a href="https://issues.apache.org/jira/browse/OPENJPA-2484">OPENJPA-2484</a>
*/
@Test // DATAJPA-505
@Disabled
void findBinaryDataByIdJpaQl() throws Exception {
byte[] data = "Woho!!".getBytes("UTF-8");

View File

@@ -1,26 +0,0 @@
/*
* Copyright 2017-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository.query;
import org.springframework.test.context.ContextConfiguration;
/**
* @author Christoph Strobl
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaJpa21UtilsTests extends Jpa21UtilsTests {
}

View File

@@ -1,27 +0,0 @@
/*
* Copyright 2015-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository.query;
import org.springframework.test.context.ContextConfiguration;
/**
* OpenJpa-specific tests for {@link ParameterMetadataProvider}.
*
* @author Oliver Gierke
* @soundtrack Elephants Crossing - We are (Irrelephant)
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaParameterMetadataProviderIntegrationTests extends ParameterMetadataProviderIntegrationTests {}

View File

@@ -1,26 +0,0 @@
/*
* Copyright 2013-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository.query;
import org.springframework.test.context.ContextConfiguration;
/**
* @author Oliver Gierke
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaQueryUtilsIntegrationTests extends QueryUtilsIntegrationTests {
}

View File

@@ -299,13 +299,6 @@ public interface UserRepository extends JpaRepository<User, Integer>, JpaSpecifi
// DATAJPA-460
List<User> deleteByLastname(String lastname);
/**
* @see <a href="https://issues.apache.org/jira/browse/OPENJPA-2484">OPENJPA-2484</a>
*/
// DATAJPA-505
// @Query(value = "select u.binaryData from User u where u.id = :id")
// byte[] findBinaryDataByIdJpaQl(@Param("id") Integer id);
/**
* Explicitly mapped to a procedure with name "plus1inout" in database.
*/

View File

@@ -1,33 +0,0 @@
/*
* Copyright 2013-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository.support;
import org.junit.jupiter.api.Disabled;
import org.springframework.test.context.ContextConfiguration;
/**
* Integration tests to execute {@link JpaRepositoryTests} against OpenJpa.
*
* @author Oliver Gierke
*/
@ContextConfiguration("classpath:openjpa.xml")
class OpenJpaJpaRepositoryTests extends JpaRepositoryTests {
@Override
@Disabled
void testCrudOperationsForCompoundKeyEntity() {
}
}

View File

@@ -1,62 +0,0 @@
/*
* Copyright 2013-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository.support;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
/**
* OpenJpa execution for {@link JpaMetamodelEntityInformationIntegrationTests}.
*
* @author Oliver Gierke
* @author Greg Turnquist
*/
@ExtendWith(SpringExtension.class)
@ContextConfiguration({ "classpath:infrastructure.xml", "classpath:openjpa.xml" })
class OpenJpaMetamodelEntityInformationIntegrationTests extends JpaMetamodelEntityInformationIntegrationTests {
@Override
String getMetadadataPersistenceUnitName() {
return "metadata_oj";
}
/**
* Re-activate test.
*/
@Test
void reactivatedDetectsIdTypeForMappedSuperclass() {
super.detectsIdTypeForMappedSuperclass();
}
/**
* Ignore as it fails with weird {@link NoClassDefFoundError}.
*/
@Override
@Disabled
void findsIdClassOnMappedSuperclass() {}
/**
* Re-activate test for DATAJPA-820.
*/
@Test
@Override
void detectsVersionPropertyOnMappedSuperClass() {
super.detectsVersionPropertyOnMappedSuperClass();
}
}

View File

@@ -1,32 +0,0 @@
/*
* Copyright 2014-2025 the original author or authors.
*
* 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
*
* https://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 org.springframework.data.jpa.repository.support;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.data.jpa.provider.PersistenceProviderIntegrationTests;
import org.springframework.test.context.ContextConfiguration;
/**
* @author Oliver Gierke
*/
@ContextConfiguration
class OpenJpaProxyIdAccessorTests extends PersistenceProviderIntegrationTests {
@Configuration
@ImportResource("classpath:openjpa.xml")
static class Config {}
}

View File

@@ -157,24 +157,6 @@
<property name="eclipselink.ddl-generation.output-mode" value="database" />
</properties>
</persistence-unit>
<persistence-unit name="metadata_oj">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<class>org.springframework.data.jpa.domain.sample.CustomAbstractPersistable</class>
<class>org.springframework.data.jpa.domain.sample.MailMessage</class>
<class>org.springframework.data.jpa.domain.sample.MailSender</class>
<class>org.springframework.data.jpa.domain.sample.MailUser</class>
<class>org.springframework.data.jpa.domain.sample.User</class>
<class>org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformationIntegrationTests$Sample</class>
<class>org.springframework.data.jpa.domain.sample.Dummy</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="openjpa.jdbc.DBDictionary" value="hsql" />
<property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
<property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:test" />
<property name="openjpa.ConnectionUserName" value="sa" />
<property name="openjpa.ConnectionPassword" value="" />
</properties>
</persistence-unit>
<persistence-unit name="metadata-id-handling">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<class>org.springframework.data.jpa.domain.sample.CustomAbstractPersistable</class>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/jdbc https://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<!-- EclipseLink vendor adaptor with workaround platform class for HSQL
usage -->
<bean id="vendorAdaptor" class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter"
parent="abstractVendorAdaptor">
<property name="database" value="HSQL" />
</bean>
<util:properties id="jpaProperties">
<prop key="openjpa.Log">none</prop>
</util:properties>
<!-- Needed to override dataSource definition from infrastructure.xml to
make OpenJPA tests work. Open JPA doesn't work with hsqldb 2.x and runs with
1.x instead which doesn't support stored procedures which leads to errors
at runtime when the scripts/schema-stored-procedure.sql is executed, therefore we omit the script here. -->
<jdbc:embedded-database id="dataSource" type="HSQL" generate-name="true"/>
</beans>