xmolecules/jmolecules-integrations

JPA converter generated for `Association`s does not work on Boot 2.6

Closed this issue · 3 comments

I am using Spring Boot 2.6.2 in my project. The org.hibernate.MappingException is thrown when I use Association type. I tried this also with the jmolecules-spring-data-jpa in jmolecules-examples, which is using Spring Boot version 3.6.1 as I write this message. The test is completed successfully. But when I change the Spring Boot version to 2.6.2, it's complaining:

javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: 821576394

This is the start of the stack trace.
image
Does JMolecules support Spring Boot 2.x?

As a workaround, I've to create my own implementation of JpaAssociationConverter in a separate class. Then manually add the @Convert annotation on the Association-typed field (even if I use the @Converter's autoApply = true).
Wondering why it doesn't work in Spring Boot 2.x.

If you can provide a reproducer project, I can take a look. While we have general integration tests against Spring Boot back until 2.6, note that the latest 2.6 depends on Hibernate 5.6.15.Final. Both that Boot and Hibernate versions have been effectively out of support for quite a while. I can only recommend moving to a newer Spring Boot version, or, at least, upgrade to 2.7.15, which is the version we build against.

Closing due to lack of feedback and the Boot version this is reported as broken against being severely outdated.