Reputation: 2352
I'm trying to migration my project to Hibernante 6 but I face some problems...
"type" attribute of @Type annotation is not recognized : @Type(type = "yes_no")
Problem to instanciate entityManagerFactory :
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
entityManagerFactoryBean.setPersistenceProviderClass(**HibernatePersistenceProvider.class**);
HibernatePersistenceProvider implements jakarta.persistence.spi.PersistenceProvider instead of javax.persistence.spi.PersistenceProvider
Have you any idea please ?
Thanks
Upvotes: 0
Views: 2129
Reputation: 324
For issue #1, as stated in the Hibernate 6.0 migration guide here,
Hibernate < 6.0:
@Type(type="yes_no")
boolean isActive;
Hibernate >= 6.0:
@Convert(converter=YesNoConverter.class)
boolean isActive;
Upvotes: 0
Reputation: 81862
For Hibernate 6 you'll need a 3.x release of Spring Data JPA. The latest Spring Data JPA release is 3.0.0 M4
Even with that Hibernate 6 support is flaky since Hibernate broke a lot of stuff both internally and for users as Spring Data JPA.
I'd recommend waiting until 3.0.0 GA.
Upvotes: 1