Commit Graph

10519 Commits

Author SHA1 Message Date
Christian Beikov 98e028c51d HHH-14483 Split insert-values statement if dialect doesn't support values lists 2023-06-21 18:24:33 +02:00
Christian Beikov 8809e5720c HHH-16831 Replace string concat with proper string format for logging 2023-06-21 16:33:02 +02:00
Scott Marlow 6c6df62e36 HHH-16275 fix whitespace
Signed-off-by: Scott Marlow <smarlow@redhat.com>
2023-06-21 11:32:32 +02:00
Scott Marlow bb76426b5b HHH-16275 also wait longer for LockTest.testLockUpdateFkTarget
Signed-off-by: Scott Marlow <smarlow@redhat.com>
2023-06-21 11:32:32 +02:00
Scott Marlow d208dda7e7 HHH-16275 wait longer for LockTest.testLock*FkTarget to insert row on the database server to avoid occasional fail with timeout getting lock
Signed-off-by: Scott Marlow <smarlow@redhat.com>
2023-06-21 11:32:32 +02:00
Yoann Rodière 23dafff99e Fix a few invalid file headers
Looks like my IDE was misconfigured when I contributed those files.
2023-06-21 10:56:30 +02:00
Christian Beikov bbb7bcf389 HHH-16721 Make sure join predicate is propagated to correlation on lazy initialization 2023-06-20 18:40:37 +02:00
Christian Beikov 1cc94c76b9 HHH-16589 Limit in clause padding to Dialect.getInExpressionCountLimit and fix negated in predicate splitting 2023-06-20 18:37:06 +02:00
Adrodoc 56955367ba HHH-16589 In clause padding can no longer cause in clauses to exceed Dialect.getInExpressionCountLimit 2023-06-20 18:37:06 +02:00
Gavin King 4e7c5df4fe note uniqueness of names in the Javadoc 2023-06-20 17:53:04 +02:00
marko-bekhta a63eed837d HHH-16815 Add default implementation throwing an exception for sorting methods on Query 2023-06-20 17:29:37 +02:00
marko-bekhta ada88805f8 HHH-16815 Remove some unused methods 2023-06-20 17:29:37 +02:00
Marco Belladelli cbac1b82c0 HHH-16773 Fix functional dependency support for TiDB and Cockroach 2023-06-20 14:21:23 +02:00
Marco Belladelli fd690f378d HHH-16784 Always resolve generic interface classes to Object type 2023-06-20 14:20:34 +02:00
Marco Belladelli eb53368115 HHH-16784 Add test for issue 2023-06-20 14:20:34 +02:00
Andrea Boriero 55f46ced44 HHH-16461 @Version + session.refresh(entity, LockMode.PESSIMISTIC_WRITE) leads to StaleObjectStateException 2023-06-20 12:21:59 +02:00
Yoann Rodière f78c5d375d HHH-16461 Test @Version + session.refresh(entity, LockMode.PESSIMISTIC_WRITE) 2023-06-20 12:21:59 +02:00
Gavin King fb4f5ba617 HHH-16823 support for nvarchar on MySQL
In H6 we stopped producing nvarchar columns on MySQL, but it's
needed for MySQL 5.7. On the other hand, actually nvarchar is
deprecated in MySQL 8.

So use 'varchar character set utf8' instead.
2023-06-20 09:30:51 +02:00
Andrea Boriero c9baeb5c68 HHH-16794 With Bytecode enhancement a lazy ManyToOne association targeting an Entity annotated with @Proxy(lazy = false) is eagerly loaded 2023-06-19 15:49:39 +02:00
Andrea Boriero d71a0f77e1 HHH-16794 Add test for issue 2023-06-19 15:49:39 +02:00
Andrea Boriero 46bfc59cd1 HHH-16743 StackOverflowError when loading a ManyToOne whith @Proxy(lazy=false) 2023-06-19 13:44:21 +02:00
gtoison 4933303f0b HHH-16743 Add test for issue 2023-06-19 13:44:21 +02:00
Gavin King bc8c0a238c clean up some imports in tests 2023-06-18 03:24:29 +02:00
Gavin King 7d79760b9a HHH-16633 make GenericDialect public
oops, tests did not catch this
2023-06-18 03:21:05 +02:00
Gavin King 7ecec615d3 HHH-16815 fix generic signature of ascending() / descending()
+ code cleanups in the Query hierarchy
2023-06-17 23:10:48 +02:00
Gavin King c6658fbb84 HHH-16815 add ascending()/descending()/unordered() to SelectionQuery
This is going to be very convenient
2023-06-17 20:07:02 +02:00
Gavin King b1998782e9 HHH-16633 introduce new package for @HQL, @SQL, @CheckHQL annotations 2023-06-17 20:07:02 +02:00
Gavin King cfe545ec3d HHH-16633 introduce native query methods to JPA metamodel generator 2023-06-17 20:07:02 +02:00
Gavin King 698b245753 HHH-16633 introduce query methods to JPA metamodel generator 2023-06-17 20:07:02 +02:00
Gavin King d3e15a7cc1
don't throw ParsingException (it represents a bug in the parser) (#6819)
- we should throw SyntaxException for expected conditions
- also, avoid the use of weirdo non-standard hyphenation in error messages
2023-06-17 14:08:14 +02:00
Gavin King ce98e3ea49
ParsingException should extend QueryException (#6816) 2023-06-16 21:55:43 +02:00
Marco Belladelli 336f83b03e HHH-16537 Check correlated too for compatible joined group 2023-06-16 17:22:42 +02:00
Marco Belladelli 562a3d901e HHH-16537 Add test for issue 2023-06-16 17:22:42 +02:00
Steve Ebersole 4e72ccb097 HHH-16809 - Add JavaType#createArray
https://hibernate.atlassian.net/browse/HHH-16809

Clean-up dead references to `JavaType#getSpecializedTypeDeclaration`
2023-06-16 09:59:34 -05:00
Marco Belladelli 9dca8f084b HHH-16713 Fix number of row counts check in BatchImpl 2023-06-16 14:08:43 +02:00
Marco Belladelli de5987b3b3 HHH-16713 Add test for issue 2023-06-16 14:08:43 +02:00
Marco Belladelli e5d59b64fd HHH-16773 Introduce support for group/order by PK functional dependency 2023-06-16 14:06:54 +02:00
Gavin King 715212c694 fix links to deprecated annotation in jdoc 2023-06-16 13:57:31 +02:00
Gavin King 7cf4fd0626
update the QuickStart guide (#6807)
* update the code examples in the quickstart

* update the quickstart document

* slightly restructure the quickstart document
2023-06-15 23:52:49 +02:00
Gavin King 126207bbfe
HHH-16805 typecheck arguments of HQL arithmetic operators (#6804) 2023-06-15 17:26:59 +02:00
Gavin King aff3c105b6
lighter punctuation in binding/extracting log message (#6790) 2023-06-15 16:22:36 +02:00
Gavin King 96941f3775
HHH-16802 typecheck subquery predicates (#6801) 2023-06-15 11:51:08 +02:00
Andrea Boriero 9d052413fc HHH-16797 - Mark org.hibernate.metamodel as incubating 2023-06-15 10:44:50 +02:00
Christian Beikov e8acf51608 HHH-16739 Fix several failures when comparing enum parameters with constant values 2023-06-14 19:13:36 +02:00
Steve Ebersole f24660e1fd HHH-16797 - Mark org.hibernate.metamodel as incubating
https://hibernate.atlassian.net/browse/HHH-16797
2023-06-14 10:42:36 -05:00
Marco Belladelli b0419a8fe2 HHH-16678 Add back query literal initialization assertion 2023-06-14 17:25:05 +02:00
Marco Belladelli 6984c4a9e8 HHH-16678 Use seed and next for version increase query literal 2023-06-14 17:25:05 +02:00
Marco Belladelli e31754086a HHH-16678 Add test for issue 2023-06-14 17:25:05 +02:00
Andrea Boriero 4878a1d277 HHH-16744 Wrong class created when reusing a join column for different entities in multiple ManyToOne 2023-06-14 13:17:59 +02:00
gtoison 7223a5eb53 HHH-16474 issue reproducer 2023-06-14 13:17:59 +02:00
Gavin King b971b1e377 introduce UnknownFilterException for consistency with UnknownProfileException 2023-06-14 12:28:43 +02:00
Marco Belladelli d63323cb63 HHH-16714 Add test and fix structured cache for inheritance subtypes 2023-06-14 10:29:30 +02:00
Andrea Boriero 7d0f313efe HHH-16767 From#getJoins throws exception if non-attribute was joined 2023-06-14 10:22:58 +02:00
Andrea Boriero c6ae189ca5 HHH-16767 Add test for issue 2023-06-14 10:22:58 +02:00
Andrea Boriero 37aa5b21a3 HHH-16750 ClassCastException when an Entity with an ElementCollection has an EmbeddableId with just one field and Batch is enabled 2023-06-14 10:21:07 +02:00
Andrea Boriero 254d01484d HHH-16750 Add test for issue 2023-06-14 10:21:07 +02:00
Andrea Boriero 6b8beaaf3a HHH-16740 Fetching an element collection on an entity with a composite id fails when batch size > 1 2023-06-14 10:21:07 +02:00
marko-bekhta f3c21bbab2 HHH-16740 Add a test case to reproduce the issue 2023-06-14 10:21:07 +02:00
Andrea Boriero a64748ba84 HHH-16673 Fail to get access lazy fetched field ( @ManyToOne ) wich is part of a composite Id (using an @IdClass) when stored in L2 cache 2023-06-14 10:19:35 +02:00
Andrea Boriero 036631f42c HHH-16673 Add test for issue 2023-06-14 10:19:35 +02:00
Gavin King 9adffa4e4f further work on query parser exceptions
I missed a couple of things
2023-06-14 10:02:00 +02:00
Christian Beikov d859f43748 HHH-16782 Allow query plan caching of criteria queries 2023-06-14 07:39:49 +02:00
Christian Beikov 97a699a3e1 HHH-16749 Reuse BasicType from Value for JPA Metamodel instead of creating dedicated BasicDomainType instances 2023-06-14 07:39:29 +02:00
Jan-Willem Gmelig Meyling 6ed858a461 HHH-16749 Reproducer for incorrect function argument domain type 2023-06-14 07:39:29 +02:00
Christian Beikov 2fb7cdd08b HHH-16697 Fix auto type discovery for aggregate functions on Oracle 2023-06-13 20:59:58 +02:00
Christian Beikov 1a9732a5c2 HHH-16786 Fix NPE in SqmParameterInterpretation when binding null for select item in insert-select statement 2023-06-13 20:59:07 +02:00
Christian Beikov 2ad5cdd9b9 HHH-16787 Multi-valued parameter with single element parameter list fails with no such element exception 2023-06-13 20:57:32 +02:00
Gavin King 694eee977f
Query parser exceptions (#6782)
* clean up exception reporting in query translator

especially, introduce SyntaxException, since SemanticException and
ParsingException were both being misused to report syntax errors
2023-06-13 19:53:19 +02:00
Christian Beikov f50cbce7ba Allow access to sqlBuffer via @Internal method 2023-06-13 18:21:57 +02:00
Steve Ebersole d16482697c Add target and retention to `@JavaServiceLoadable` 2023-06-13 11:06:37 -05:00
Yoann Rodière 7450f916f1 Test non-standard access with extended bytecode enhancement
Turns out there is nothing wrong and these tests already pass.
2023-06-13 11:29:45 +02:00
Gavin d43f618eba deprecated some exception constructors we need to migrate away from
it's really important to report the actual HQL that caused the failure
2023-06-13 01:20:19 +02:00
Gavin e2cf383f7a fix up the error message in InterpretationException 2023-06-13 01:20:19 +02:00
Gavin 3a8e66d600 HHH-16783 split @Any discriminator handling into two subclasses 2023-06-13 01:20:19 +02:00
Gavin 925d09528d HHH-16783 allow implicit discriminator mappings in @Any 2023-06-13 01:20:19 +02:00
Cedomir Igaly b364a9d50a HHH-16614 - Properly handling before/after tables on creation for auxiliary database objects 2023-06-12 18:14:04 +02:00
Marco Belladelli 8408849a50 HHH-16770 Only expand top level entity valued paths for group/order by 2023-06-12 16:45:30 +02:00
Marco Belladelli 15310330f8 HHH-16770 Add test for issue 2023-06-12 16:45:30 +02:00
Cedomir Igaly 3e8056de8e HHH-16759 - ComponentType.isMutable should return false when component is record; replace method(s) should return original for immutable classes 2023-06-12 15:18:12 +02:00
Cedomir Igaly 86ed7abd97 HHH-16759 - Test case - merge embedded record 2023-06-12 15:18:12 +02:00
Gavin a3534bcab4 clean up RepresentationMode enum 2023-06-12 14:09:21 +02:00
Christian Beikov f0ebb55026 HHH-16774 Ensure composite field tracking enhancement works also when @Embedded annotation is missing 2023-06-12 11:00:48 +02:00
Marco Belladelli 47eb862e06 HHH-16745 Consider loading entity entries when checking if transient 2023-06-12 09:30:49 +02:00
Benedikt Biallowons b157ec35c6 HHH-16745 Add test for issue 2023-06-12 09:30:49 +02:00
Marco Belladelli ecc7dc1880 HHH-16761 Throw error for identifier properties not found in `@IdClass` 2023-06-12 09:28:15 +02:00
Gavin 45133f1df2 HHH-16777 add typesafe version of Hibernate.isPropertyInitialized()
like in HR
2023-06-11 10:19:14 +02:00
Gavin e6ec43f257 very minor code/comment changes 2023-06-11 10:19:14 +02:00
Gavin bc81eb6d19 fix error reported for empty HQL string 2023-06-10 23:54:54 +02:00
Gavin e0d08a5f26 avoid printing {element} in err message 2023-06-09 23:09:05 +02:00
Jan Schatteman e18dde78bf HHH-16472 - Add test for issue
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-06-09 22:40:29 +02:00
Gavin 43af98fa52 HHH-16731 fix validation of @Any mappings 2023-06-09 22:11:42 +02:00
Gavin 5110fd4653 HHH-16776 more consistent reporting of errors in attribute paths
and squash some warnings
2023-06-09 22:11:42 +02:00
Aurimas Niekis 9075cf84fb
HHH-16772 Added a check method to `SetFieldOnArgument` setter bytecode generator to check if value type is 64-bit and adjust operand stack size accordingly. (#6756)
HHH-16772 Added a check method to `SetFieldOnArgument` setter bytecode generator to check if value type is 64-bit and adjust operand stack size accordingly.
2023-06-09 18:49:24 +02:00
Gavin 81deaa1049 add missing @Override 2023-06-09 17:24:58 +02:00
Gavin bdacc8b05f make it easier to mock the QueryEngine 2023-06-09 17:24:58 +02:00
Gavin 910c5d4276 slightly improve some error messages 2023-06-09 17:24:58 +02:00
Gavin f7ab7f4afc fix error when treat target type is not found 2023-06-09 17:24:58 +02:00
Gavin 0a98b41f0e fix an IOOB exception in SqmPathRegistryImpl 2023-06-09 17:24:58 +02:00
Gavin a3e6e06519 refactor out a function so that it can be used by query-validator 2023-06-09 17:24:58 +02:00
Gavin 0ae432f0fb misc minor changes 2023-06-09 17:24:58 +02:00
Gavin 3dff3fb20e API changes for query-validator 2023-06-09 17:24:58 +02:00
Oleksii Klochko 67f737f4ab HHH-16640: Return this instead of null for method chaining 2023-06-09 00:21:15 +02:00
Gavin a707d8e345 remove obsolete warning suppression in test 2023-06-08 19:02:32 +02:00
Gavin 4bbf67fb3b get rid of backticks in error message 2023-06-08 19:02:32 +02:00
Gavin 33c9338520 fix a CCE from SemanticQueryBuilder 2023-06-08 19:02:32 +02:00
Marco Belladelli 7e115eb8f4 HHH-16719 Add test for issue 2023-06-07 13:48:29 +02:00
Cedomir Igaly 670db01c9a HHH-16612 Use qualified table name for embeddable mappings 2023-06-06 16:17:31 +02:00
Cedomir Igaly bda41ec0b9 HHH-16612 Add test for issue 2023-06-06 16:17:31 +02:00
Marco Belladelli bf1068be7e HHH-16661 Use qualified table names for entity name by table name map 2023-06-06 16:17:31 +02:00
Marco Belladelli 53d474d85f HHH-16661 Add test for issue 2023-06-06 16:17:31 +02:00
Gavin d567b839da HHH-16727 initial work on StatelessSession.upsert()
marked @Incubating
2023-06-06 16:08:05 +02:00
Gavin 3af493a344 failure no longer expected for test 2023-06-06 16:08:05 +02:00
Gavin 37c071fa20 better formatting for 'merge' and 'case' 2023-06-06 16:08:05 +02:00
Marco Belladelli 95e6ed1001 HHH-16641 Add test and fix order column on generic non-map associations 2023-06-06 15:56:16 +02:00
Andrea Boriero f8275f1a70 HHH-16624 Do not create subselects when there are fewer than 2 results 2023-06-06 10:11:19 +02:00
Andrea Boriero 4c1d8a19bf HHH-16624 Add test for issue 2023-06-06 10:11:19 +02:00
Gavin King 4eee30550c HHH-16747 nail down query result types and actually document the semantics 2023-06-05 20:12:01 +02:00
Gavin c5ecf5d41c HHH-16742 fix implementation of TupleMetadata
fix issue when "same" selection item is assigned two different aliases
2023-06-05 20:12:01 +02:00
Gavin acf9495af3 HHH-16710 constructor-based instantiation for native queries 2023-06-05 20:12:01 +02:00
Gavin 1557a66e6e HHH-16710 allow Map and List instantiation for native SQL queries 2023-06-05 20:12:01 +02:00
Gavin 72f03d9d0f HHH-16710 implicit instantiation of record classes 2023-06-05 20:12:01 +02:00
Gavin 87a2b967c7 HHH-16710 implicit instantiation of Lists, Maps 2023-06-05 20:12:01 +02:00
Christian Beikov 7a04ba3bfb HHH-16682 Test and fix dirty checking for @JdbcTypeCode(SqlTypes.JSON) maps 2023-06-05 16:50:20 +02:00
Christian Beikov b5748fd22e HHH-16490 Test case for allowing to map same column twice, once with a custom Java type 2023-06-05 16:49:04 +02:00
Christian Beikov 9e6cc04eb3 HHH-16250 Test case for allowing to map same column twice, once with a user type 2023-06-05 16:49:04 +02:00
Christian Beikov 2cc1362df7 HHH-15929 Handle the possibility of different JdbcMappings for the same column 2023-06-05 16:49:04 +02:00
Jan Schatteman eedd6197ce Ignore test for MariaDB
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-06-05 16:45:42 +02:00
Jan Schatteman fe958f9c12 HHH-16578 - Add a test that shows the more restrictive schema validation (less dependant on columnDefinition info, and more on the use of @JdbcTypeCode)
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-06-05 16:45:42 +02:00
Jan Schatteman be9692765c HHH-16578 - Minor change to the column information extraction
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-06-05 16:45:42 +02:00
Gavin King 9dad4c44bb HHH-16437 add test 2023-06-05 16:36:49 +02:00
Marco Belladelli 15bdd9d60a HHH-16574 Return treat type as path source for treated joins 2023-06-05 16:27:37 +02:00
Marco Belladelli 1ac116c169 HHH-16693 Add test for issue 2023-06-05 16:27:37 +02:00
Marco Belladelli 1be67bf222 HHH-16574 Add test for issue 2023-06-05 16:27:37 +02:00
Christian Beikov 945f2b8adb HHH-16606 Only use RowTransformerArrayImpl when result type is Object[] 2023-06-05 16:07:07 +02:00
Cedomir Igaly 857a5c0724 HHH-16606 - Test for selecting only property of array type using criteria query 2023-06-05 16:07:07 +02:00
Christian Beikov f2cf18cb75 HHH-16680 Add test for treating correlated from node 2023-06-05 12:37:16 +02:00
Gavin King 43a3bc5883 HHH-16022 fix extremely ugly errors when HQL parsing failed
the formatting of syntax errors was terrible
2023-06-03 17:16:23 +02:00
Gavin King f511282ce3 clean up IdentifierLoadAccessImpl 2023-06-03 11:19:42 +02:00
Sanne Grinovero 7c089a5c4b HHH-16741 Fully remove the deprecated method getJdbcMappings() 2023-06-02 17:32:41 +01:00
Sanne Grinovero 03132883f4 HHH-16741 Deprecate method getJdbcMappings() and prepare for its removal (backportable patch) 2023-06-02 17:32:41 +01:00
Gavin f22d7e1328 fix doc because @AnyKeyJavaClass seems to be required 2023-06-01 01:16:34 +02:00
Gavin 8cc7eb7a66 HHH-16732 make HQL id() function work for @Any mappings 2023-06-01 01:16:34 +02:00
Andrea Boriero 2287f3ce3b HHH-16725 Persisting multiple entities with one-many association and composite key with ordered updates enabled fails 2023-05-31 20:20:07 +02:00
marko-bekhta 911b005d7d HHH-16725 Add a test case to reproduce the issue 2023-05-31 20:20:07 +02:00
Andrea Boriero 7157899079 HHH-16613 @Lazy @ManyToOne @Cacheable association is retrieved as initialized 2023-05-31 17:45:13 +02:00
marko-bekhta f6ec141b47 HHH-16613 Add a test case to display an issue 2023-05-31 17:45:13 +02:00
Marco Belladelli a64490ed50 HHH-16559 Disable batch fetching for dynamic instantiation queries 2023-05-31 13:52:31 +02:00
Marco Belladelli 2cd7104d9d HHH-16559 Add test for issue 2023-05-31 13:52:31 +02:00
Andrea Boriero 8e8a554eb9 HHH-16379 @DynamicUpdate and 'enableDirtyTracking=true' leads to wrong update statement 2023-05-31 12:18:40 +02:00
Andrea Boriero 198ede22e4 HHH-16379 Add test for issue 2023-05-31 12:18:40 +02:00