[hibernate-dev] Any change of adding generics to Hibernate specific API

Emmanuel Bernard emmanuel at hibernate.org
Wed Apr 29 05:14:53 EDT 2015


Hi Vlad,

That’s an interesting proposal. It is certainly possible. But since the Session and Query API (Hibernate native) is historically non typed, I wonder if that is worth introducing these new typed version and add more overloaded methods on Session.
Do you think it is worth the additional complexity?

Steve, do you have some plan for a Session API revamp some time in the future? Some spring cleaning of sort.

Emmanuel


> On 15 Apr 2015, at 22:27, Mihalcea Vlad <mih_vlad at yahoo.com> wrote:
> 
> Hi,
> Although many rely on the Java Persistence API, Hibernate still offers specific features, like mapping a native SQLQuery result set to a DTO:
> .setResultTransformer(Transformers.aliasToBean(DTO.class));
> Is it possible to add TypedQuery and TypedSQLQuery, analogous to the JPA specs, so you can use generics with specific API?
> Adding new interfaces and some overloaded Session methods wouldn't break backward compatibility.
> 
> Vlad MiIhalcea
> _______________________________________________
> 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