brucehyslop opened a new issue, #16688:
URL: https://github.com/apache/grails-core/issues/16688

   ### Expected Behavior
   
   The domain class containing custom composite type works with 
`grails-data-hibernate5` however fails when switching to 
`grails-data-hibernate7`
   ```
   @Entity
   class Payment {
   
       MonetaryAmount amount
       MonetaryAmount feeAmount
   
       static mapping = {
   
           amount type: MonetaryAmountType, {
               column name: 'amount'
               column name: 'currency'
           }
   
           feeAmount type: MonetaryAmountType, {
               column name: 'fee_amount'
               column name: 'fee_currency'
           }
       }
   }
   ```
   Expected mapping of `MonetaryAmount` POJO to the custom DB columns. 
   
   ### Actual Behaviour
   
   When porting `MonetaryAmountType` implementation of 
`org.hibernate.usertype.CompositeUserType` for hibernate7 and using 
`grails-data-hibernate7` the bootstrapping of the HibernateDatastore throws the 
exception
   ```
   java.lang.IllegalArgumentException: Named type [class 
com.example.gorm.MonetaryAmountType] did not implement BasicType nor UserType
   ```
   
   ### Steps To Reproduce
   
   1. checkout repo 
https://github.com/brucehyslop/grails-data-hibernate-custom-composite-user-type-mapping,
 default branch `grails-data-hibernate5`
   2. run `./gradlew bootRun` successful skeleton app
   3. checkout branch `grails-data-hibernate7`
   4. run `./gradlew bootRun` (fails to run)
   
   ### Environment Information
   
   - Operating System: macOS 26
   - JDK Version: 25
   
   ### Example Application
   
   
https://github.com/brucehyslop/grails-data-hibernate-custom-composite-user-type-mapping
   
   ### Version
   
   8.0.0


-- 
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