I’m using bytecode enhancement in my project to ensure that all associations are lazily loaded. I added the maven plugin to my pom-file. However, it seems like it does not affect my testing, some associations are still eagerly loaded even though I have the flag “enableLazyInitialization” is set to true. Is there something more I need to do in order to activate the bytecode enhancement with my entities in the code to make the associations be lazy loaded? I have tried setting all the entities manually to lazy aswell, but the same problem as when not using the tool occurs, OneToOne-associations are eagerly loaded. The documentation does not mention anything more than adding the plugin to the pom-file. Is there some way I can ensure that the tool is up and running?
I have decompiled them, they are identical to the original source code so I guess that they are not being enhanced. I’ve tried recompiling with Maven, but it does not make a difference. I’ve checked the console for any printouts, but there doesn’t seem to be anything about the bytecode tool. Any ideas? Should it just be enough to include the tool in the pom-file and then compile using maven? Also I’m running unit tests to test my application.