From 07ecc6dcef4419cea25aea648019ff0ac3a2e58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Tue, 12 Oct 2021 09:04:00 +0200 Subject: [PATCH] HSEARCH-3277 Avoid using @Type annotations They will be removed in Hibernate ORM 6. --- .../mapper/orm/model/GenericPropertyIT.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/model/GenericPropertyIT.java b/integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/model/GenericPropertyIT.java index f3c50122f57..74e1a3d37cb 100644 --- a/integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/model/GenericPropertyIT.java +++ b/integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/model/GenericPropertyIT.java @@ -8,6 +8,7 @@ import static org.hibernate.search.util.impl.integrationtest.mapper.orm.OrmUtils.with; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; import jakarta.persistence.Basic; @@ -118,25 +119,17 @@ public void setGenericProperty(GenericEntity genericProperty) { } @Entity(name = "generic") - public abstract static class GenericEntity { + public abstract static class GenericEntity { @Id private Integer id; @Basic @GenericField - // Necessary for Hibernate ORM: even if we make T extend Serializable, - // ORM doesn't take it into account for some reason. - @SuppressWarnings("deprecation") - @org.hibernate.annotations.Type(type = "serializable") private T content; @Basic @GenericField - // Necessary for Hibernate ORM: even if we make T extend Serializable, - // ORM doesn't take it into account for some reason. - @SuppressWarnings("deprecation") - @org.hibernate.annotations.Type(type = "serializable") private T[] arrayContent; @OneToMany(mappedBy = "genericProperty")