I Googled around but don't see any tutorials for upgrading Hibernate to 5.2.
The only thing I could find was this: http://hibernate.org/search/documentation/migrate/5.0/ but it seems to specific to Hibernate search.
I Googled around but don't see any tutorials for upgrading Hibernate to 5.2.
The only thing I could find was this: http://hibernate.org/search/documentation/migrate/5.0/ but it seems to specific to Hibernate search.
The full Hibernate ORM Upgrade Guide can be found here:
https://github.com/hibernate/hibernate-orm/blob/5.0/migration-guide.adoc
ext['hibernate.version'] = '5.2.12.Final'
for Hibernate with Gradle/hibernate directly see the Hibernate Docs `` –
Tarver Refer hibernate documentation: https://docs.jboss.org/hibernate/orm/5.0/userguide/html_single/Hibernate_User_Guide.html#bootstrap-jpa
Section 3.2) native bootstrapping might be helpful, as it was in my case during migration
config = new Configuration().configure("hibernate.cfg.xml");
config.addProperties(hibernateProperties);
BootstrapServiceRegistry bootstrapServiceRegistry = new BootstrapServiceRegistryBuilder()
.build();
StandardServiceRegistryBuilder standardServiceRegistryBuilder = new StandardServiceRegistryBuilder(bootstrapServiceRegistry);
standardServiceRegistryBuilder.applySettings(config.getProperties());
StandardServiceRegistry standardServiceRegistry = standardServiceRegistryBuilder
.configure()
.build();
MetadataSources metadataSources = new MetadataSources(standardServiceRegistry);
metadataSources.addPackage(packageWithMappedClasses);
Metadata metadata = metadataSources.buildMetadata();
sessionFactory = metadata.buildSessionFactory();
© 2022 - 2024 — McMap. All rights reserved.