Closed heyimMarc closed 1 year ago
I haven't tested it on Micronaut, but I'll add support for it in the next versions.
Ar the moment, you can disable the Runtime Scanner like this:
HypersistenceOptimizer hypersistenceOptimizer = new HypersistenceOptimizer(
new JpaConfig(entityManagerFactory)
.setRuntimeScannerEnabled(false)
);
This way, you will still get to scan the mappings and configurations, but you will avoid the errors you're seeing until this issue is resolved.
Fixed.
Hi there, it would be cool to support Micronaut.
First I thought the integration of the hypersistence-optimizer would be no issue because its using hibernate 5, but I'm getting strange errors until I add the dependency via gradle.
Could not obtain transaction-synchronized Session for current thread org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread at app//io.micronaut.transaction.hibernate5.MicronautSessionContext.currentSession(MicronautSessionContext.java:91)
I'm using Micronaut 3.8.0.
Maybe it's just a simple change to fix this, but at this time it's not working for me. Any ideas?
Let me know if you need more input.