This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/main by this push:
     new 86155a1f8c Update Hibernate to 6.6.2.Final (#2162)
86155a1f8c is described below

commit 86155a1f8c83b49aa7085b71ff8400966e2f3dd9
Author: Andriy Redko <[email protected]>
AuthorDate: Sat Nov 23 07:38:21 2024 -0500

    Update Hibernate to 6.6.2.Final (#2162)
---
 parent/pom.xml                                     |  2 +-
 .../search/hibernate/SearchTypeContributor.java    | 45 ++++++++++++++++++++++
 .../org.hibernate.boot.model.TypeContributor       |  1 +
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index f18d904f5d..bffb6ea166 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -120,7 +120,7 @@
         <cxf.glassfish.json.version>2.0.1</cxf.glassfish.json.version>
         <cxf.hamcrest.version>3.0</cxf.hamcrest.version>
         <cxf.hazelcast.version>5.5.0</cxf.hazelcast.version>
-        <cxf.hibernate.em.version>6.5.2.Final</cxf.hibernate.em.version>
+        <cxf.hibernate.em.version>6.6.2.Final</cxf.hibernate.em.version>
         
<cxf.hibernate.validator.version>8.0.1.Final</cxf.hibernate.validator.version>
         <cxf.hsqldb.version>2.7.3</cxf.hsqldb.version>
         
<cxf.httpcomponents.asyncclient.version.range>[4.0,4.2)</cxf.httpcomponents.asyncclient.version.range>
diff --git 
a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hibernate/SearchTypeContributor.java
 
b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hibernate/SearchTypeContributor.java
new file mode 100644
index 0000000000..903b8eeb1b
--- /dev/null
+++ 
b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/hibernate/SearchTypeContributor.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * http://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.apache.cxf.jaxrs.ext.search.hibernate;
+
+import org.apache.cxf.jaxrs.ext.search.jpa.BookReview.Review;
+import org.hibernate.boot.model.TypeContributions;
+import org.hibernate.boot.model.TypeContributor;
+import org.hibernate.service.ServiceRegistry;
+import org.hibernate.type.SqlTypes;
+import org.hibernate.type.descriptor.java.EnumJavaType;
+import org.hibernate.type.descriptor.jdbc.EnumJdbcType;
+import org.hibernate.usertype.StaticUserTypeSupport;
+
+public class SearchTypeContributor implements TypeContributor {
+    @Override
+    public void contribute(TypeContributions typeContributions, 
ServiceRegistry serviceRegistry) {
+        typeContributions.contributeType(new StaticUserTypeSupport<>(new 
EnumJavaType<>(Review.class),
+            new EnumJdbcType() {
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                public int getDefaultSqlTypeCode() {
+                    return SqlTypes.VARCHAR;
+                }
+            })
+        );
+    }
+}
diff --git 
a/rt/rs/extensions/search/src/test/resources/META-INF/services/org.hibernate.boot.model.TypeContributor
 
b/rt/rs/extensions/search/src/test/resources/META-INF/services/org.hibernate.boot.model.TypeContributor
new file mode 100644
index 0000000000..9cd8e8e552
--- /dev/null
+++ 
b/rt/rs/extensions/search/src/test/resources/META-INF/services/org.hibernate.boot.model.TypeContributor
@@ -0,0 +1 @@
+org.apache.cxf.jaxrs.ext.search.hibernate.SearchTypeContributor

Reply via email to