Add missing EntityManagerFactory hints for SharedEntityManagerCreator
Closes gh-30523
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 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.
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.orm.jpa;
|
||||
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
@@ -56,4 +57,10 @@ class EntityManagerRuntimeHintsTests {
|
||||
assertThat(RuntimeHintsPredicates.proxies().forInterfaces(Session.class, EntityManagerProxy.class))
|
||||
.accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
void entityManagerFactoryHasReflectionHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onMethod(EntityManagerFactory.class, "getCriteriaBuilder")).accepts(this.hints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onMethod(EntityManagerFactory.class, "getMetamodel")).accepts(this.hints);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user