Re: [hibernate-dev] Support for entities without default constructor

2018-02-11 Thread Gunnar Morling
> The avoidance of reflective constructor invocation via byte code generation should be rather simple using ByteBuddy. Turns out that the ByteBuddy byte code provider already has an instantiation optimizer doing exactly that [1]. Unfortunately, though, from what I can say it's never used due to a

Re: [hibernate-dev] Support for entities without default constructor

2018-02-04 Thread Gunnar Morling
I like it, but I think that's two separate concerns: * using byte code generation to improve performance of entity instantiations * avoiding the need for entities to have a parameterless constructor, emphasising the mandatory properties of an entity (by requiring them as constructor parameters)

[hibernate-dev] Support for entities without default constructor

2018-02-03 Thread Vlad Mihalcea
Hi, I realized that we could allow users to define entities without a default constructor. For Kotlin, which supportsdefault values, this could be beneficial. There is some info about how we could do that in this using Objenesis in the following Spring issue: