[hibernate-dev] Support for entities without default constructor

Vlad Mihalcea mihalcea.vlad at gmail.com
Sun Feb 4 02:34:10 EST 2018


For anyone interested, Josh Long tell more about why they took this
approach where they inject the default constructor:

https://twitter.com/starbuxman/status/960049941916696578

Rafael Winterhaler shows that this can be easily done with Byte Buddy which
we already used before:

https://twitter.com/rafaelcodes/status/959892398997458946

If we can prove that it's indeed significantly faster than using Java
Reflection to build entities,
I think we should think about taking this approach as well.

What do you think of this?

Vlad

On Sat, Feb 3, 2018 at 5:03 PM, Vlad Mihalcea <mihalcea.vlad at gmail.com>
wrote:

> 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:
>
> https://jira.spring.io/plugins/servlet/mobile#issue/SPR-10594
>
> Let me know what you think,
> Vlad
>


More information about the hibernate-dev mailing list