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

borinquenkid pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit b80d8b82c64ea8f22b74b271e3f58f1d0bb2353d
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Sat Feb 21 11:14:06 2026 -0600

    cleanups
---
 grails-data-hibernate7/README.md                   |  6 +--
 .../compiler/GormCompilerAutoConfiguration.groovy  |  2 +-
 grails-data-hibernate7/core/01.txt                 |  1 -
 grails-data-hibernate7/core/02.txt                 | 10 ----
 grails-data-hibernate7/core/CLAUSE_HIERARCHY.md    | 62 ----------------------
 grails-data-hibernate7/core/inspect_proxy.groovy   |  8 ---
 .../orm/hibernate/HibernateGormStaticApi.groovy    | 44 ---------------
 .../core/update_named_query_spec.groovy            | 22 --------
 8 files changed, 4 insertions(+), 151 deletions(-)

diff --git a/grails-data-hibernate7/README.md b/grails-data-hibernate7/README.md
index a126299df9..8a3144d848 100644
--- a/grails-data-hibernate7/README.md
+++ b/grails-data-hibernate7/README.md
@@ -4,15 +4,15 @@ This project implements [GORM](https://gorm.grails.org) for 
the Hibernate 7.
 With the removal of Criterion API in Hibernate 6, we wanted to continue to 
support the DetachedCriteia in GORM as much as possible. We also wanted to 
encapsulate the JPA Criteria Building in one class so the following was done:
 * DetachedCriteria holds almost all the state of the Query being built. It 
hold the target class for the query. It does not hold a session.
 * AbstractHibernateQuery has a session and holds the DetachedCriteria and is a 
thin wrapper for it. Calling list or singleResult will internally create the 
Query and execute it. 
-* AbstractHibernateCriteriaBuilder is a thin wrapper around 
AbstractHibernateQuery. Its main function is to use closures to populate the 
Hibernate Query and execute it at the end of the closure.
-* Only the grails-datastore-gorm-hibernate6 module is being developed at the 
time.
+* HibernateCriteriaBuilder is a thin wrapper around HibernateQuery. Its main 
function is to use closures to populate the Hibernate Query and execute it at 
the end of the closure.
+* Only the grails-datastore-gorm-hibernate7 module is being developed at the 
time.
 
 For testing the following was done:
 * Used testcontainers of postgres instead of h2 because h2 does not support 
all the Java Types correctly.
 * A more opinionated and fluent HibernateGormDatastoreSpec is used for the 
specifications.
 
 ### Largest Gaps
-* generator strategy now must be set using JPA annotations
+
 
 ### Ignored Features
 
diff --git 
a/grails-data-hibernate7/boot-plugin/src/main/groovy/org/grails/datastore/gorm/boot/compiler/GormCompilerAutoConfiguration.groovy
 
b/grails-data-hibernate7/boot-plugin/src/main/groovy/org/grails/datastore/gorm/boot/compiler/GormCompilerAutoConfiguration.groovy
index 32d7f22be7..1574bd6ef8 100644
--- 
a/grails-data-hibernate7/boot-plugin/src/main/groovy/org/grails/datastore/gorm/boot/compiler/GormCompilerAutoConfiguration.groovy
+++ 
b/grails-data-hibernate7/boot-plugin/src/main/groovy/org/grails/datastore/gorm/boot/compiler/GormCompilerAutoConfiguration.groovy
@@ -42,7 +42,7 @@ class GormCompilerAutoConfiguration extends 
CompilerAutoConfiguration {
     @Override
     void applyDependencies(DependencyCustomizer dependencies) throws 
CompilationFailedException {
         dependencies.ifAnyMissingClasses('grails.persistence.Entity', 
'grails.gorm.annotation.Entity')
-                        .add('grails-data-hibernate5-core')
+                        .add('grails-data-hibernate7-core')
     }
 
     @Override
diff --git a/grails-data-hibernate7/core/01.txt 
b/grails-data-hibernate7/core/01.txt
deleted file mode 100644
index 89fd269aee..0000000000
--- a/grails-data-hibernate7/core/01.txt
+++ /dev/null
@@ -1 +0,0 @@
-AttachMethodSpec. Test attach method
diff --git a/grails-data-hibernate7/core/02.txt 
b/grails-data-hibernate7/core/02.txt
deleted file mode 100644
index 18ce578abd..0000000000
--- a/grails-data-hibernate7/core/02.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-AttachMethodSpec. Test attach method
-BuiltinUniqueConstraintWorksWithTargetProxiesConstraintsSpec. test unique 
constraint for the associated child object
-BuiltinUniqueConstraintWorksWithTargetProxiesConstraintsSpec. test unique 
constraint on root instance
-CascadeBehaviorFetcherSpec. test cascade behavior fetcher for embedded 
association
-CascadeBehaviorFetcherSpec. test cascade behavior fetcher for uni: String
-DirtyCheckingSpec. test relationships not marked dirty when domain objects are 
used
-JoinPerfSpec. test read performance with join query
-QueryEventsSpec. post-events are fired after queries are run
-QueryEventsSpec. pre-events are fired before queries are run
-SessionCreationEventSpec. test event for new session
\ No newline at end of file
diff --git a/grails-data-hibernate7/core/CLAUSE_HIERARCHY.md 
b/grails-data-hibernate7/core/CLAUSE_HIERARCHY.md
deleted file mode 100644
index 26bc600dfc..0000000000
--- a/grails-data-hibernate7/core/CLAUSE_HIERARCHY.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# Criteria and Projection Hierarchy in PredicateGenerator
-
-| Class used in `instanceof` | Class Hierarchy (from `Query.java` or GORM) |
-| :--- | :--- |
-| `Query.Junction` | `Query.Junction` -> `Query.Criterion` |
-| `Query.Disjunction` | `Query.Disjunction` -> `Query.Junction` -> 
`Query.Criterion` |
-| `Query.Conjunction` | `Query.Conjunction` -> `Query.Junction` -> 
`Query.Criterion` |
-| `Query.Negation` | `Query.Negation` -> `Query.Junction` -> `Query.Criterion` 
|
-| `Query.DistinctProjection` | `Query.DistinctProjection` -> 
`Query.Projection` |
-| `DetachedAssociationCriteria` | `DetachedAssociationCriteria` -> 
`AbstractDetachedCriteria` -> `Criteria` |
-| `Query.PropertyCriterion` | `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.Equals` | `Query.Equals` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.NotEquals` | `Query.NotEquals` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.IdEquals` | `Query.IdEquals` -> `Query.Criterion` |
-| `Query.GreaterThan` | `Query.GreaterThan` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.GreaterThanEquals` | `Query.GreaterThanEquals` -> 
`Query.PropertyCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.LessThan` | `Query.LessThan` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.LessThanEquals` | `Query.LessThanEquals` -> `Query.PropertyCriterion` 
-> `Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.SizeEquals` | `Query.SizeEquals` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.SizeNotEquals` | `Query.SizeNotEquals` -> `Query.PropertyCriterion` 
-> `Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.SizeGreaterThan` | `Query.SizeGreaterThan` -> 
`Query.PropertyCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.SizeGreaterThanEquals` | `Query.SizeGreaterThanEquals` -> 
`Query.PropertyCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.SizeLessThan` | `Query.SizeLessThan` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.SizeLessThanEquals` | `Query.SizeLessThanEquals` -> 
`Query.PropertyCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.Between` | `Query.Between` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.ILike` | `Query.ILike` -> `Query.Like` -> `Query.PropertyCriterion` 
-> `Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.RLike` | `Query.RLike` -> `Query.Like` -> `Query.PropertyCriterion` 
-> `Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.Like` | `Query.Like` -> `Query.PropertyCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.In` | `Query.In` -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.NotIn` | `Query.NotIn` -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.SubqueryCriterion` | `Query.SubqueryCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.GreaterThanEqualsAll` | `Query.GreaterThanEqualsAll` -> 
`Query.SubqueryCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.GreaterThanAll` | `Query.GreaterThanAll` -> `Query.SubqueryCriterion` 
-> `Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.LessThanEqualsAll` | `Query.LessThanEqualsAll` -> 
`Query.SubqueryCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.LessThanAll` | `Query.LessThanAll` -> `Query.SubqueryCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.EqualsAll` | `Query.EqualsAll` -> `Query.SubqueryCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.GreaterThanEqualsSome` | `Query.GreaterThanEqualsSome` -> 
`Query.SubqueryCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.GreaterThanSome` | `Query.GreaterThanSome` -> 
`Query.SubqueryCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.LessThanEqualsSome` | `Query.LessThanEqualsSome` -> 
`Query.SubqueryCriterion` -> `Query.PropertyNameCriterion` -> `Query.Criterion` 
|
-| `Query.LessThanSome` | `Query.LessThanSome` -> `Query.SubqueryCriterion` -> 
`Query.PropertyNameCriterion` -> `Query.Criterion` |
-| `Query.IsNull` | `Query.IsNull` -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.IsNotNull` | `Query.IsNotNull` -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.IsEmpty` | `Query.IsEmpty` -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.IsNotEmpty` | `Query.IsNotEmpty` -> `Query.PropertyNameCriterion" -> 
`Query.Criterion` |
-| `Query.EqualsProperty` | `Query.EqualsProperty` -> 
`Query.PropertyComparisonCriterion" -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.NotEqualsProperty` | `Query.NotEqualsProperty` -> 
`Query.PropertyComparisonCriterion" -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.LessThanEqualsProperty` | `Query.LessThanEqualsProperty` -> 
`Query.PropertyComparisonCriterion" -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.LessThanProperty` | `Query.LessThanProperty` -> 
`Query.PropertyComparisonCriterion" -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.GreaterThanEqualsProperty` | `Query.GreaterThanEqualsProperty" -> 
`Query.PropertyComparisonCriterion" -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.GreaterThanProperty` | `Query.GreaterThanProperty" -> 
`Query.PropertyComparisonCriterion" -> `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.Exists` | `Query.Exists` -> `Query.Criterion` |
-| `Query.NotExists` | `Query.NotExists` -> `Query.Criterion` |
-| `Query.PropertyNameCriterion` | `Query.PropertyNameCriterion` -> 
`Query.Criterion` |
-| `Query.PropertyProjection` | `Query.PropertyProjection` -> 
`Query.Projection` |
-| `Query.DistinctPropertyProjection` | `Query.DistinctPropertyProjection` -> 
`Query.PropertyProjection` -> `Query.Projection` |
-| `Query.IdProjection` | `Query.IdProjection` -> `Query.Projection` |
-| `Query.CountProjection` | `Query.CountProjection` -> `Query.Projection` |
-| `Query.CountDistinctProjection` | `Query.CountDistinctProjection` -> 
`Query.PropertyProjection` -> `Query.Projection` |
-| `Query.MaxProjection` | `Query.MaxProjection` -> `Query.PropertyProjection` 
-> `Query.Projection` |
-| `Query.MinProjection` | `Query.MinProjection` -> `Query.PropertyProjection` 
-> `Query.Projection` |
-| `Query.AvgProjection` | `Query.AvgProjection` -> `Query.PropertyProjection` 
-> `Query.Projection` |
-| `Query.SumProjection` | `Query.SumProjection` -> `Query.PropertyProjection` 
-> `Query.Projection` |
diff --git a/grails-data-hibernate7/core/inspect_proxy.groovy 
b/grails-data-hibernate7/core/inspect_proxy.groovy
deleted file mode 100644
index 86ebc7801d..0000000000
--- a/grails-data-hibernate7/core/inspect_proxy.groovy
+++ /dev/null
@@ -1,8 +0,0 @@
-
-try {
-    def cls = 
Class.forName("yakworks.hibernate.proxy.ByteBuddyGroovyProxyFactory")
-    println "Constructors for ${cls.name}:"
-    cls.declaredConstructors.each { println it }
-} catch (e) {
-    println "Error: ${e.message}"
-}
diff --git 
a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy
 
b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy
index 2be9f4b0b4..1ac4eba1bc 100644
--- 
a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy
+++ 
b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy
@@ -434,53 +434,9 @@ class HibernateGormStaticApi<D> extends GormStaticApi<D> {
         }
     }
 
-    protected Map<String,Object> filterQueryArgumentMap(Map<String,Object> 
query) {
-        Map<String,Object> queryArgs = new HashMap<>()
-        for (entry in query.entrySet()) {
-            if (entry.value instanceof CharSequence) {
-                queryArgs[entry.key] = entry.value.toString()
-            }
-            else {
-                queryArgs[entry.key] = entry.value
-            }
-        }
-        return queryArgs
-    }
 
 
 
-    protected String buildNamedParameterQueryFromGString(GString query, Map 
params) {
-        StringBuilder sqlString = new StringBuilder()
-        int i = 0
-        Object[] values = query.values
-        def strings = query.getStrings()
-        for (str in strings) {
-            sqlString.append(str)
-            if (i < values.length) {
-                String parameterName = "p$i"
-                sqlString.append(':').append(parameterName)
-                params.put(parameterName, values[i++])
-            }
-        }
-        return sqlString.toString()
-    }
-
-
-
-
-
-    protected List<String> removeNullNames(Map query) {
-        List<String> nullNames = []
-        Set<String> allNames = new HashSet<>(query.keySet() as Set<String>)
-        for (String name in allNames) {
-            if (query[name] == null) {
-                query.remove name
-                nullNames << name
-            }
-        }
-        nullNames
-    }
-
     protected Serializable convertIdentifier(Serializable id) {
         def identity = persistentEntity.identity
         if(identity != null) {
diff --git a/grails-data-hibernate7/core/update_named_query_spec.groovy 
b/grails-data-hibernate7/core/update_named_query_spec.groovy
deleted file mode 100644
index a8e94f8094..0000000000
--- a/grails-data-hibernate7/core/update_named_query_spec.groovy
+++ /dev/null
@@ -1,22 +0,0 @@
-import java.io.File
-
-File file = new 
File("../../grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/NamedQuerySpec.groovy")
-List<String> lines = file.readLines()
-List<String> newLines = []
-boolean importAdded = false
-boolean annotationAdded = false
-
-for (String line in lines) {
-    if (!importAdded && line.startsWith("import ")) {
-        newLines.add("import spock.lang.IgnoreIf")
-        importAdded = true
-    }
-    if (!annotationAdded && line.contains("class NamedQuerySpec")) {
-        newLines.add("@IgnoreIf({ 
System.getProperty(\"hibernate7.gorm.suite\") == \"true\" })")
-        annotationAdded = true
-    }
-    newLines.add(line)
-}
-
-file.write(newLines.join("\n") + "\n")
-println "Successfully updated NamedQuerySpec.groovy"
\ No newline at end of file

Reply via email to