[hibernate-dev] AutoCloseable is great.. what about JPA?

Steve Ebersole steve at hibernate.org
Sat Dec 3 09:32:24 EST 2016


Personally I don't think dynamic-instantiations  (ConstructorResults) are
hacky at all.  In fact I love dynamic-instantiations for all kinds of use
cases.  I wonder if your concern with them is their limited capabilities.

For example, JPA does not define support for nesting dynamic-instantiations
or the ability to use setter injection (both of which I have already
implemented for 6.0 btw).  Otherwise we'd need to understand more exactly
what you are talking about.

On Sat, Dec 3, 2016, 2:07 AM Christian Beikov <christian.beikov at gmail.com>
wrote:

> Hey Jordan,
>
> maybe what you are looking for is Blaze-Persistence Entity Views?
> https://github.com/Blazebit/blaze-persistence#entity-view-usage
> Query caching should work since it builds on top of scalar queries, but
> lazy loading is something I don't support and honestly don't think will
> support.
>
> Regards,
> Christian
>
> Am 02.12.2016 um 18:40 schrieb Jordan Gigov:
> > One thing I think JPA is lacking is the ability to map read-only result
> classes,
> > without annotating them as @Entity and making the provider expect
> > table for them.
> > ConstructorResult is a pretty hacky way of getting there and loses some
> of the
> > benefits like lazy loading collections and in Hibernate's case query
> caching.
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list