I'm currently reading Vlad Mihalcea's book High-Performance Java Persistence.
In the Bytecode Enhancement section, it is said that enableDirtyTracking
can optimize performance with large amounts of data through replacing reflections. But I'm just wondering if there are any disadvantages?
Unfortunately, I couldn't find any or only very old information.
<plugin>
<groupId>org.hibernate.orm.tooling</groupId>
<artifactId>hibernate-enhance-maven-plugin</artifactId>
<version>${hibernate.version}</version>
<executions>
<execution>
<configuration>
<failOnError>true</failOnError>
<enableDirtyTracking>true</enableDirtyTracking>
<enableLazyInitialization>false</enableLazyInitialization>
<enableAssociationManagement>false</enableAssociationManagement>
<enableExtendedEnhancement>false</enableExtendedEnhancement>
</configuration>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>
And while doing further research in the Hibernate documentation I came across three more properties:
enableLazyInitialization
,enableAssociationManagement
,enableExtendedEnhancement
.
But I can't find much about it on the internet.
If I understood it correctly, enableAssociationManagement
makes the independent handling of bidirectional relationships superfluous and replaces enableLazyInitialization
like enableDirtyTracking
Reflections?
Unfortunately, I couldn't find anything about enableExtendedEnhancement
. That's why I have the same question as above. Should I just use it? Or which disadvantages result from it?