[hibernate-dev] Introducing a "none" BytecodeProvider

Guillaume Smet guillaume.smet at gmail.com
Thu Oct 18 09:01:43 EDT 2018


Hi,

On Thu, Oct 18, 2018 at 1:33 PM Sanne Grinovero <sanne at hibernate.org> wrote:

> > Regarding "BasicProxyFactory", Guillaume and I had to fight with this
> think a few weeks ago, I think. If I remember correctly, it's used in
> particular to instantiate abstract classes (!) during bootstrap. It seems
> to be needed when copying data around from an object to another in
> particular; maybe when the type of an @Embedded property is abstract?
> Someone else probably knows more. All I can say is it made some tests fail
> some time ago, so you can try making it throw exceptions and run the tests
> that fail in debug mode, to see why it's useful exactly.
>
> Thanks for the hint.
>
> I had found some similar clues, and I'm thinking to just limit its
> applicability to models which don't have similar needs: in a second
> phase we could look at creating the necessary bytecode to handle these
> corner cases as well by having the build time enhancement generate the
> additional support classes.


All I can say is that it's useful in some corner cases. If I remember
correctly, Yoann is right about abstract @Embedded properties.

Creating the classes at enhancement time could be a possibility but I'm not
sure we have all the information required to do that when we enhance the
entities.

I think it goes without saying but we still need to have ORM working
without enhancement, considering how many bugs we have related to enhanced
classes.

-- 
Guillaume


More information about the hibernate-dev mailing list