| Niko Wittenbeck I have been thinking about this issue in the last couple days. I agree on your analysis around isMappedCollection(field) that it may related with the issue of premature loading lazy collections. The thing is that due to the way the enhancer works (on the fields) the signature for that method only takes the field as a parameter and as of today only lookup annotations on the field. I can certainly improve the default enhancement context to try to lookup annotations from an accessor method and that will work for most cases (assuming the name of the field is consistent with the name of the getter method). For something more than that, one will have to provide a custom enhancement context ... to be honest, as of today, I'm not sure how easy it is for someone to provide their own custom implementation without forking the build plugins and modify them. |