You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring Data JPA doesn't boot when using Hibernate with multi-tenancy
Issue: #3425
When Hibernate is configured with multi-tenancy, upon startup
Spring JPA calls PersistenceProvider.fromEntityManager(entityManager)
which initalizes Hibernate Session. This requires a tenant to be present
and may produce failures.
Signed-off-by: Ariel Morelli Andres <[email protected]>
Copy file name to clipboardExpand all lines: spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/query/AbstractStringBasedJpaQueryUnitTests.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@
18
18
importstaticorg.mockito.Mockito.*;
19
19
20
20
importjakarta.persistence.EntityManager;
21
+
importjakarta.persistence.EntityManagerFactory;
21
22
importjakarta.persistence.metamodel.Metamodel;
22
23
23
24
importjava.lang.reflect.Method;
@@ -53,6 +54,7 @@
53
54
*
54
55
* @author Christoph Strobl
55
56
* @author Mark Paluch
57
+
* @author Ariel Morelli Andres, Atlassian US, Inc
56
58
*/
57
59
classAbstractStringBasedJpaQueryUnitTests {
58
60
@@ -135,15 +137,16 @@ static class InvocationCapturingStringQueryStub extends AbstractStringBasedJpaQu
Copy file name to clipboardExpand all lines: spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/support/SimpleJpaRepositoryUnitTests.java
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,7 @@
60
60
* @author Jens Schauder
61
61
* @author Greg Turnquist
62
62
* @author Yanming Zhou
63
+
* @author Ariel Morelli Andres, Atlassian US, Inc
63
64
*/
64
65
@ExtendWith(MockitoExtension.class)
65
66
@MockitoSettings(strictness = Strictness.LENIENT)
@@ -84,6 +85,7 @@ class SimpleJpaRepositoryUnitTests {
0 commit comments