[hibernate-dev] Deprecated methods of NativeQuery via SQLQuery

Steve Ebersole steve at hibernate.org
Thu Aug 31 12:21:21 EDT 2017


Yes, I understand now.  That is a good idea.

On Thu, Aug 31, 2017 at 11:20 AM Guillaume Smet <guillaume.smet at gmail.com>
wrote:

> Steve,
>
> I think you misunderstood my point. Vlad got it.
>
> addEntity() is part of the NativeQuery API (and was moved to NativeQuery in
> your 6 branch).
>
> It is marked as deprecated for our users because it is only present in
> SQLQuery which is marked as deprecated.
>
> I think the methods that will be kept and moved to NativeQuery in 6 should
> be copied to NativeQuery right away in 5.2 (and not kept only in SQLQuery)
> so that they are not marked as deprecated for our users. Because, indeed,
> they are not.
>
> I hope my point is more clear now.
>
> (I can do the legwork if it helps)
>
> --
> Guillaume
>
> On Wed, Aug 30, 2017 at 8:27 PM, Vlad Mihalcea <mihalcea.vlad at gmail.com>
> wrote:
>
> > That's a good question.
> >
> > There are some methods which don't have a replacement in JPA so we should
> > probably move to some subclass and remove the deprecated flag.
> >
> > Vlad
> >
> > On Wed, Aug 30, 2017 at 5:59 PM, Guillaume Smet <
> guillaume.smet at gmail.com>
> > wrote:
> >
> >> Hi,
> >>
> >> In OGM tests, we have a lot of warnings on this sort of constructs:
> >> NativeQuery query = session.createNativeQuery( nativeQuery ).addEntity(
> >> OscarWildePoem.class );
> >> because addEntity() comes from SQLQuery and SQLQuery is deprecated.
> >>
> >> I don't think it's a good thing for our users as they have a warning and
> >> they can't really do anything about it.
> >>
> >> I have a vague rememberance of a  discussion about it a few months ago
> but
> >> I don't remember the outcome of it.
> >>
> >> Shouldn't we copy all the non deprecated methods of SQLQuery to
> >> NativeQuery
> >> so that our users don't get a warning?
> >>
> >> Or maybe I missed something?
> >>
> >> Thanks!
> >>
> >> --
> >> Guillaume
> >> _______________________________________________
> >> 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