From 39457c5e121f6069c3d59005bd033f5c1b4d43f0 Mon Sep 17 00:00:00 2001 From: Marco Belladelli Date: Fri, 2 Feb 2024 09:38:10 +0100 Subject: [PATCH] Fix ORA-21700 in SetAsBasicTest --- .../hibernate/orm/test/annotations/basic/SetAsBasicTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/basic/SetAsBasicTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/basic/SetAsBasicTest.java index e966181b6f..6e628f143d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/basic/SetAsBasicTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/basic/SetAsBasicTest.java @@ -9,6 +9,8 @@ package org.hibernate.orm.test.annotations.basic; import java.util.HashSet; import java.util.Set; +import org.hibernate.testing.jdbc.SharedDriverManagerTypeCacheClearingIntegrator; +import org.hibernate.testing.orm.junit.BootstrapServiceRegistry; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; @@ -26,6 +28,8 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; } ) @SessionFactory +// Clear the type cache, otherwise we might run into ORA-21700: object does not exist or is marked for delete +@BootstrapServiceRegistry(integrators = SharedDriverManagerTypeCacheClearingIntegrator.class) public class SetAsBasicTest { @Test