clean up org.hibernate.query package #4535
Replies: 4 comments 4 replies
-
Hard to say without specifics. Bit open-ended. Quick notes on some specific ones -
IMO should be API. Under the premise that users might in fact reference these SQM / Criteria nodes in their code.
Probably could go away. I generally try to sub-type all JPA contracts as
Nothing says we cannot do both. It was a mistake to move Query itself to the new package in hindsight. What has stopped me from reversing that has been the fact that we deprecated the top level one. Not sure it is a great idea to undo a deprecation that has directed users to something else. Otherwise you get into situation where in earlier version we've told users to move from Regarding the rest... The logging objects are interesting. I had starting putting them in API mainly on the premise that users could see the associated logger categories. But in retrospect, that is better handled via documentation (User Guide or something like
|
Beta Was this translation helpful? Give feedback.
-
I'm not following the difference you are trying to make here. How is something like this "explicit" if the user did not request it? And still not following why you thought these should be different. iiuc your argument is because they are used in different, but same ways? I mean null ordering is null ordering. Sure you created |
Beta Was this translation helpful? Give feedback.
-
Another thing I just ran into: we have two very-similar-looking |
Beta Was this translation helpful? Give feedback.
-
Almost everything here was fixed already, and the package looks a lot better in H6. The one remaining thing I notice is that we still have Since it's |
Beta Was this translation helpful? Give feedback.
-
Since
Query
lives in this package, this is one of the two most "public user-facing API" packages in Hibernate.Currently, in H6, it has accumulated quite a lot of cruft:
NavigablePath
,TreatedNavigablePath
,EntityIdentifierNavigablePath
, andQueryLogging
),JpaTuple
, which declares no operations, andIntervalType
which is an enum with one member), andIntervalType
again, probablyLimit
, maybeImmutableEntityUpdateQueryHandlingMode
).There are also a bunch of enums which represent concepts which are sort-of common across HQL and criteria, and I don't hate them being there, but they're still not really user-facing APIs and perhaps we should find a better place for them too.
Overall the package just looks like a bucket of stuff that we didn't know where else to put.
I think it's very important that we clean this up before H6 goes out.
(Well, either that, or we move
Query
back toorg.hibernate
.)Beta Was this translation helpful? Give feedback.
All reactions