我正在使用Hibernate 4.2和构建时字节码插装来解决出现在@OneToOne
关系和@Lob
上的惰性问题 (https://developer.jboss.org/wiki/SomeExplanationsOnLazyLoadingone-to-one)
你知道以下两者之间的区别吗:
Hibernate字节码插装:http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch20.html#performance-fetching-lazyproperties
Hibernate字节码增强:http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch20.html#bytecode-enhancement
因为在Hibernate文档中,写到:
EnhancementTask旨在完全替代InstrumentTask,同时与InstrumentTask不兼容,因此任何现有的instrumented类都需要重新从源代码构建。
我可以通过使用字节码注入来解决我的问题,但是使用字节码增强却不起作用。您知道为什么吗?
也许这个新功能还没有完全开发好?
感谢您的帮助。