Commit Graph

13185 Commits

Author SHA1 Message Date
Gavin King 2e8bf3d1df make 'element' and 'value' synonyms, along with 'index' and 'key' 2022-01-10 15:48:34 +01:00
Gavin King e6128551b3 document new collection aggregate function syntax
and fix some other problems I found in the examples
2022-01-10 15:48:34 +01:00
Gavin King 3e8f1c67df clean up lots of warnings by adding wildcards to raw types
also comment out some unused code
2022-01-10 15:48:34 +01:00
Gavin King 4b5e6e1969 introduce new syntax for aggregate functions applying to collections
max(element x.y), min(index x.y), sum(element x.y)

and rationalize the node types here
2022-01-10 15:48:34 +01:00
Gavin King 38fc97feb3 sort out some confusion regarding elements() vs value() + indices() vs index()
Strictly, elements() and indices() don't make sense as select items, but we
have tests for this, and users who reported bugs and sent in patches, etc, etc,
so I'm going to go ahead and keep accepting them in the select clause as a
blessed misuse.

I'm not however going to allow them to be dereferenced because no, that's why.
2022-01-10 07:09:12 +01:00
Gavin King abd63d73ea clean up warnings and broken Javadoc links on Cache interface 2022-01-10 00:18:27 +01:00
Gavin King 7f9f8e1ff3 clean up FlushMode 2022-01-10 00:18:27 +01:00
Gavin King 3fb6c1ce26 Refresh the javadoc of a bunch of annotations 2022-01-10 00:18:27 +01:00
Gavin King 596debed4d make @Check work when applied at the field level
This was a bug!

Also add checkConstraint member to @Table to allow check constraints on secondary tables

Also clean up some Javadoc of some related annotations
2022-01-10 00:01:24 +01:00
Gavin King bd8bf15e00 fix some warnings in IntelliJ (unnecessary StringBuilder) 2022-01-09 21:58:05 +01:00
Gavin King 4324509a59 allow @Comment to apply at the class level
yes, you can do it with the @Table annotation but this is nicer,
no good reason to not allow it
2022-01-09 21:32:30 +01:00
Gavin King 9eac2b193b skip some tests on TiDB 2022-01-09 17:36:37 +01:00
Gavin King c88a9ac8bc improve javadoc for @Order/@Sort annotations 2022-01-09 11:50:31 +01:00
Gavin King 740779165d add IdentifierLoadAccess.withReadOnly()
adding this to the other XxxxLoadAccess interfaces is much harder,
but this one is easy
2022-01-08 15:21:10 +01:00
Gavin King e02e1e2ffb remove the layer-breaking getLobCreator() methods from the Hibernate class
This is in principle a breaking change, but one I consider pretty innocuous,
since I can't imagine why anyone was calling Hibernate.getLobCreator(session)
instead of session.getLobHelper().
2022-01-08 12:35:43 +01:00
Gavin King e331c2870e more cosmetic improvements to HQL error reporting
makes the messages and exception types a bit more consistent
2022-01-08 12:14:21 +01:00
Gavin King 60ad64b2a6 update explanation of limit/fetch join problem for H6 2022-01-08 11:58:44 +01:00
Gavin King e79d7efbce use instanceof instead of isInstance() on the hot path
surely NBD, but such an easy thing to fix and remove all doubt
2022-01-08 10:45:53 +01:00
Gavin King 6c83e1d0ec cosmetic improvements to HQL error reporting
makes the messages and exception types a bit more consistent
2022-01-08 09:59:02 +01:00
Gavin King 3103d84949 fix an incorrect statement about case sensitivity 2022-01-08 02:31:20 +01:00
Gavin King fc079ba226 disable test on some dialects 2022-01-08 00:15:14 +01:00
Gavin King 77aa6ab244 use Map.entry() instead of ouw own MapEntryImpl for entry() function
add tests for HQL collection functions
2022-01-08 00:15:14 +01:00
Gavin King 90cd25bc5d remove obsolete comments and enable a (fixed) test 2022-01-08 00:15:14 +01:00
Gavin King 032d224531 totally trivial test for autoquoting of initial _
that actually really does test that it does what it should :)
2022-01-07 18:54:59 +01:00
Gavin King 32f4122470 autoquote column names with initial _ on those dbs that require it 2022-01-07 18:54:59 +01:00
Gavin King 54b5a85af4 add a whole passage about serialization 2022-01-07 12:14:06 +01:00
Gavin King 1b1790bb8c improvements to javadoc for Transaction + SharedSessionContract 2022-01-07 11:58:42 +01:00
Gavin King 0e8203c600 remove obsolete APIs and clean up warnings
rewrite the incorrect javadoc for the class Hibernate
2022-01-07 11:58:42 +01:00
Gavin King b444fbf9a5 deprecate "old" methods of session and add a new one
- deprecated load()
- deprecated save(), saveOrUpdate(), and update()
- deprecated delete()
- deprecated "dangerous" overloads of refresh()
- added getReference() taking an entity name
- improved the Javadoc for lots of operations
2022-01-07 11:58:42 +01:00
Steve Ebersole 448d678fb5 Drop `@CollectionClassificationType`;
Drop `@CollectionSemantics`;
Drop `@CollectionSemanticsRegistration(s)`;
Add `@CollectionTypeRegistration(s)`;
Rename `@CustomType` to `@Type`;
User Guide and Migration Guide changes
2022-01-06 21:46:48 -06:00
Gavin King b8d26f829e add a test for selecting a datetime literal
seems to be causing problems in 2 dbs
2022-01-07 00:20:38 +01:00
Gavin King 2c00a647cb add a test for datediff()/dateadd() functions 2022-01-07 00:20:38 +01:00
Gavin King a1ea84a3ac two very minor doc fixes 2022-01-06 23:26:21 +01:00
Gavin King 86025a9af8 try to get the test working again on Sybase 2022-01-06 18:10:00 +01:00
Gavin King 01600b48e5 remove a workaround for a bug on derby that was fixed ages ago 2022-01-06 18:10:00 +01:00
Gavin King aef951f279 move some function arg typechecking up to the SQM phase
this is where it needs to be for checking of named queries at startup
and for any checks that happen in an IDE or at build time
2022-01-06 18:10:00 +01:00
Gavin King 7178caea8d fix lots of warnings in AbstractHANADialect 2022-01-06 18:10:00 +01:00
Gavin King cc91beb536 typecheck HQL function arguments 2022-01-06 18:10:00 +01:00
Steve Ebersole a73068cc0f Improve CollectionClassification javadoc 2022-01-06 09:05:38 -06:00
Steve Ebersole 773f3429c6 hibernate.mapping.default_list_semantics (`AvailableSettings#DEFAULT_LIST_SEMANTICS`)
make LIST the default classification for List attributes with no `@OrderColumn`, etc.
2022-01-06 08:53:00 -06:00
Gavin King 1beabbdf40 update some of the tests to use non-deprecated methods
or at least suppress the warnings
2022-01-06 15:25:21 +01:00
Gavin King 261ca55b0f improve some javadoc for Query 2022-01-06 15:25:21 +01:00
Gavin King 780fb3e500 add createStatement() methods
these are needed for executing insert/update/delete queries, because we
deprecated the createQuery() methods that accept no Class as a parameter

these are much better-named anyway, and have a better return type
2022-01-06 15:25:21 +01:00
Gavin King c96f22dfe0 remove hibernate.dialect.show_hql_functions and just make it a log category
really unclear why I didn't do it that way in the first place
2022-01-06 15:24:35 +01:00
Steve Ebersole 0b96d8fca7 - fix too-long identifier for Oracle 2022-01-06 06:21:01 -06:00
Filipe Roque bcb1577b43 HHH-15013 H2 2.0.202 no longer supports nextval, replacing with ANSI SQL 2022-01-06 10:56:00 +01:00
Gavin King 30f627ce39 improvements to Javadoc for hints 2022-01-06 10:28:31 +01:00
Gavin King 17a06e2ffa fix for problem on main 2022-01-06 10:28:31 +01:00
Steve Ebersole 1131292fa9 - fix apparently illegal Oracle identifier 2022-01-05 20:51:41 -06:00
Steve Ebersole a71ba9e385 Initial work to re-organize the Collections chapter in the UserGuide;
Docs for @CollectionType, @CollectionClassificationType and @CollectionSemantics;
Some api/spi/internal work;
Migration Guide;
2022-01-05 16:26:58 -06:00