borinquenkid commented on PR #15568:
URL: https://github.com/apache/grails-core/pull/15568#issuecomment-4531309843

   To help guide the review of this PR, I want to provide a high-level overview 
of the major architectural changes and design decisions introduced in this 
branch. Given the magnitude of the changes, this
     context should clarify the mechanical shifts across the modules.           
                                                                                
                                             
                                                                                
                                                                                
                                             
     1. Hibernate Criteria API to JPA Criteria API Migration                    
                                                                                
                                             
     Hibernate 6 and 7 completely removed the legacy native Criteria API, 
replacing it with the JPA Criteria API. Because our HibernateCriteriaBuilder 
heavily depended on that legacy API, we had to rethink
     how queries are built. To bridge this gap, we implemented a chain using 
HibernateCriteriaBuilder and HibernateQuery. This chain now leverages GORM's 
DetachedCriteria internally to collect all the     
     necessary query elements and state before eventually constructing and 
executing the final JPA query.                                                  
                                                  
     2. HQL Query Compilation and State Management                              
                                                                                
                                             
     On the HQL side of things, we introduced the HQLQueryContext. This new 
context object is responsible for cleanly collecting all state and handling the 
compilation of HQL queries, providing better     
     isolation and structure for HQL execution.                                 
                                                                                
                                             
     3. GrailsDomainBinder Decomposition                                        
                                                                                
                                             
     The GrailsDomainBinder had grown significantly and was handling too many 
responsibilities. As part of this update, it has been decomposed into multiple 
focused, smaller classes. This improves         
     maintainability and makes it much easier to reason about the binding 
lifecycle.                                                                      
                                                   
     4. HibernateMappingContext Hierarchy                                       
                                                                                
                                             
     We tightened the HibernateMappingContext hierarchy to be strictly 
Hibernate-specific. This ensures that the context semantics are well-defined 
and prevents leakage of generic data-mapping concepts    
     where Hibernate-specific behavior is required.                             
                                                                                
                                             
                                                                                
                                                                                
                                             
     These architectural shifts are the primary drivers of the footprint of 
this PR. The accompanying style adjustments (CodeNarc, Checkstyle, PMD) were 
applied mechanically to ensure the new monorepo     
     maintains high code quality from day one and to prevent accumulating 
technical debt moving forward.                                                  
                                                   
                                                                                
                                                                                
                                             
     Let me know if you have any questions about specific implementation 
details in these areas!***   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to