Commit Graph

8270 Commits

Author SHA1 Message Date
Andrea Boriero 2d19bdbaf3 HHH-15113 Exception setting ParameterExpressions on Update Queries 2022-03-14 23:27:41 +00:00
Steve Ebersole 741b6b71f1 logging report 2022-03-11 14:45:43 -06:00
Steve Ebersole e16fbb6c31 report-tasks 2022-03-09 12:28:13 -06:00
Christian Beikov 293315ffa4 HHH-15105 Test and fix for NPE when access default query cache region statistics 2022-03-09 12:10:14 +01:00
Yoann Rodière a88170d24a HHH-15107 Upgrade to Mockito 4.3.1 2022-03-09 08:11:09 +01:00
Steve Ebersole 3a6ad2fd3a Fix test failure 2022-03-08 23:40:41 -06:00
Steve Ebersole 3dc0dd0a6f HHH-15114 - Clean up deprecations 2022-03-08 21:39:21 -06:00
Steve Ebersole 1fe1110f0b HHH-15106 - fk() SQM function 2022-03-08 21:00:08 -06:00
Steve Ebersole 415b28f116 HHH-15114 - Clean up deprecations 2022-03-08 20:24:14 -06:00
Jan Schatteman c46ec5a14e Removed deprecated AbstractEntityPersister.getIdentityDelegate()
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 91a1ff81f8 Removed deprecated SharedSessionContractImplementor.getTimestamp()
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 291e755686 Removed deprecated methods in ProxyFactoryFactory and NoneBasicProxyFactory
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 9fc2b3dea5 Removed deprecated LazyAttributesMetadata.getAttributesInSameFetchGroup(...)
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 4b5d3e645b Removed deprecated SessionFactoryOptions.getStatelessInterceptorImplementor()
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 2244ab8e61 Removed deprecated QueryEngine.DEFAULT_PARAMETER_METADATA_MAX_COUNT
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 4669fc7c4c Removed deprecated org.hibernate.mapping.AuxiliaryDatabaseObject
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 7931e9c755 Removed deprecated non-static methods from LobTypeMappings and NationalizedTypeMappings
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 8e068d7647 Removed deprecated SessionFactoryServiceInitiator.initiateService(SessionFactoryImplementor, SessionFactoryOptions, ServiceRegistryImplementor)
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman b1ec3ab78b Removed deprecated Interceptor.onPrepareStatement(String sql)
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 13527366c9 Removed deprecated setFlushMode from Session and SharedSessionContractImplementor
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 8b0f70f066 Removed deprecated MetadataBuildingOptions.getReflectionManager()
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 41016674cb Removed deprecated InFlightMetadataCollector.getClassmateContext()
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Jan Schatteman 6564abe4c7 Removed deprecated transactionContext() from SharedSessionBuilder
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-03-08 18:42:18 -06:00
Christian Beikov 34b4e873df Get rid of StateArrayContributor 2022-03-08 23:10:35 +01:00
Christian Beikov af9edd50d6 Add SqlTypes.TIMESTAMP_UTC to as jdbc type for java.time.Instant 2022-03-08 23:05:09 +01:00
Christian Beikov 964e72f536 Implement support for TimeZoneStorageType.COLUMN 2022-03-08 23:05:09 +01:00
Christian Beikov fa750a9c26 Make LONGX types synonyms for X types again and remove unnecessary case labels 2022-03-08 21:59:49 +01:00
Christian Beikov 2c80250b0e Replace typeNames in Dialect with SqlType and SqlTypeRegistry that dialects contribute into 2022-03-08 21:59:49 +01:00
Christian Beikov 7a55c7b34b HHH-15071 Apply type inference in SQM for like predicate and avoid NPE in query parameters 2022-03-08 19:51:55 +01:00
Christian Beikov 3d55855a87 HHH-13694 fix numeric overflow exception for large sequence min values 2022-03-08 19:49:48 +01:00
Steve Ebersole 0af7ed353a HHH-15099 - Improve handling of associations marked with @NotFound
HHH-15106 - fk() SQM function
2022-03-08 06:22:03 -06:00
Steve Ebersole 362b4c0ac7 HHH-15106 - fk() SQM function 2022-03-08 06:21:50 -06:00
Andrea Boriero 6e6cc5f06e Fix subquery throwing SqlTreeCreationException( Found un-correlated path usage in sub query) 2022-03-08 12:55:27 +01:00
Christian Beikov 0a73425520 Flatten the junctions in the SQM model 2022-03-07 15:40:58 +01:00
Steve Ebersole 71e3b5277a HHH-15099 - Improve handling of associations marked with @NotFound
- test consolidation
2022-03-05 08:59:31 -06:00
Steve Ebersole 82feac6bd3 HHH-15099 - Improve handling of associations marked with @NotFound
- support for NotFound on logical 1-1 defined on JoinTable
2022-03-05 08:59:31 -06:00
Steve Ebersole ed5831f482 HHH-15099 - Improve handling of associations marked with @NotFound
- clean-up
2022-03-05 08:59:31 -06:00
Steve Ebersole c5ac528a24 HHH-15099 - Improve handling of associations marked with @NotFound
- database snapshot handling
2022-03-05 08:59:31 -06:00
Steve Ebersole ceb7df0c51 HHH-15099 - Improve handling of associations marked with @NotFound
- Javadoc improvements for `@NotFound`-related tests
2022-03-05 08:59:31 -06:00
Steve Ebersole d52ebfb41d HHH-15099 - Improve handling of associations marked with @NotFound
- Keep track of NotFoundAction into mapping model
- Fix tests with erroneous assertions about `@NotFound` associations allowed to be lazy
2022-03-05 08:59:31 -06:00
Steve Ebersole de97e8e1a4 HHH-15099 - Improve handling of associations marked with @NotFound
- Tests
2022-03-05 08:59:31 -06:00
Christian Beikov bdf8b2fc2e Fully generify and simplify UserType contract 2022-03-04 11:14:17 +01:00
Steve Ebersole e5c719b843 HHH-15099 - Improve handling of associations marked with @NotFound
- Tests
2022-03-03 16:13:49 -06:00
Steve Ebersole 2ced4caa2c NonLazyEntityFetch improvements 2022-03-03 16:04:42 -06:00
Steve Ebersole ec737a7f15 HHH-15099 - Improve handling of associations marked with @NotFound
- Disable physical foreign-key export for `@NotFound` mappings
2022-03-03 15:45:58 -06:00
Sanne Grinovero 572171e27f Jandex, Classmate and commons annotations shouldn't be listed as API 2022-03-03 19:23:58 +00:00
Christian Beikov e9b3066f93 Add sql type name and size information to selectable mapping 2022-03-03 10:34:26 +01:00
Yoann Rodière 3d8f5db3e0 HHH-15090 Allow passing unloaded types and a TypePool to ByteBuddyProxyHelper#buildUnloadedProxy
This is necessary to solve this bug in Quarkus.
2022-03-03 09:39:23 +01:00
Yoann Rodière 9dcd5e55b1 HHH-15090 Test lazy loading with extended bytecode enhancement and inheritance 2022-03-03 09:39:23 +01:00
Yoann Rodière e989f20b33 HHH-15090 Fix access to public field with extended bytecode enhancement returning null for entity lazy-loaded from polymorphic toOne association 2022-03-03 09:39:23 +01:00
Christian Beikov b6b500200b Use BAG for unowned OneToMany and throw an error if @OrderColumn is found on unowned ManyToMany 2022-03-02 17:02:53 +01:00
Christian Beikov a91d23825f Make list semantics setting explicit for failing tests 2022-03-02 17:02:53 +01:00
Christian Beikov 7aaeebe3af Switch back to bag by default for list semantics 2022-03-02 17:02:53 +01:00
Yoann Rodière 4f7d4b7fdb HHH-15094 Handle http://hibernate.org and https://hibernate.org for DTDs in LocalXmlResourceResolver 2022-03-01 16:23:38 +00:00
Yoann Rodière 19073672db HHH-15094 Handle both HTTP and HTTPS versions of DTDs in LocalXmlResourceResolver 2022-03-01 16:23:38 +00:00
Yoann Rodière 8c263b3945 HHH-15094 Test LocalXmlResourceResolver 2022-03-01 16:23:38 +00:00
Yoann Rodière 8c0bc94480 HHH-15094 Remove duplicate DTD descriptor 2022-03-01 16:23:38 +00:00
Yoann Rodière d56032ab7f HHH-15094 Add JPA 3.0 XSDs to LocalXmlResourceResolver 2022-03-01 16:23:38 +00:00
Brian Stansberry 9a23a679bd HHH-15084 Remove use of BeanManager.createInjectionTarget(AnnotatedType) 2022-02-28 12:34:35 +00:00
Christian Beikov 8e6fb5636b Adapt EmbeddableInstantiator and CompositeUserType to accept a ValueAccess instead of a Supplier 2022-02-25 19:15:38 +01:00
Christian Beikov c520b48487 Implement support for CompositeUserType and re-enable tests that make use of it 2022-02-25 15:36:16 +01:00
Christian Beikov 277f10d987 Support implicit joins in plural path parts and fix issues with type resolving of sub query paths 2022-02-24 07:16:38 +01:00
Christian Beikov 247689824f Re-enable some tests 2022-02-24 07:16:38 +01:00
Christian Beikov 335ed19821 Various fixes
* Fix parsing soft-keywords as naked identifiers
* Create proper correlations during parsing
* Fix some type inference issues with entity valued paths
2022-02-24 07:16:38 +01:00
Andrea Boriero 075cc8d108 Fix not increase the statistic loaded entity number when query cache is hit 2022-02-23 09:37:22 +01:00
Yoann Rodière cf9d131d35 HHH-15082 Correctly propagate the original exception when aborting a JDBC batch fails
Not strictly necessary, but it's related to these changes
and I think it's a good idea.
2022-02-18 20:36:58 +00:00
Yoann Rodière 14c8fb752d HHH-15082 Test that batch statements are aborted if a RuntimeException is thrown by Batch#addToBatch
Such an exception can be thrown if an expectation
(org.hibernate.jdbc.Expectation) is not met, for example if an update
statement for a given entity affects 0 rows (e.g. because of a concurrent
update).
2022-02-18 20:36:58 +00:00
Yoann Rodière ec6cd5d0cc HHH-15082 Abort JDBC batches on runtime exceptions as well as SQLException 2022-02-18 20:36:58 +00:00
Christian Beikov 73e9859fea Re-enable more tests.
* Make sure subselect fetch registrations are per navigable path
* Consider the result class for native queries
* Fix issues with nested property references
* Fix list expansion issues for native queries
2022-02-18 12:11:07 +01:00
Andrea Boriero 40bcb97232 Fix String index out of range when wrapping an char 2022-02-17 08:17:29 +01:00
Andrea Boriero cc750a9abd Fix Session#setProperty() for cache and timeout related properties 2022-02-17 08:16:45 +01:00
Christian Beikov c02ce35aa0 Implement on the fly callable named native query to stored procedure translation 2022-02-17 08:14:10 +01:00
Christian Beikov 439788198f Fix some stored procedure and native query issues 2022-02-17 08:14:10 +01:00
Andrea Boriero 8ed1ed5159 Re-enabled additional tests 2022-02-16 16:32:49 +01:00
Steve Ebersole 32ee43cfe7 Added missing space per code-style
Added missing space per code-style
2022-02-16 08:43:39 -06:00
William Burns 6685a7a145 HHH-15080 Session Refresh can cause StaleObjectStateException when entry in 2LC is reread 2022-02-16 08:43:39 -06:00
Andrea Boriero 26e98c0879 Fix BasicTypeResolution for collections annotated with @MapKeyTemporal 2022-02-15 19:02:07 +01:00
Andrea Boriero f14e70cb8f Re-enabled additional tests 2022-02-15 17:45:39 +01:00
Christian Beikov 2873440a25
Use proper RequiresDialect annotation 2022-02-15 13:23:55 +01:00
Christian Beikov b9dca52ecc Fix ProcedureParameterTests 2022-02-15 11:40:41 +01:00
Christian Beikov 9b6ddc8c0b Fix GeneratedAnnotationTests 2022-02-15 11:38:05 +01:00
Christian Beikov 98816362e2 Fix EntityWithManyToOneSelfReferenceTest 2022-02-15 10:11:15 +01:00
Christian Beikov b85f530b42 Log warning when FetchStyle.JOIN is used with LAZY and add migration guide entry for fetch all properties 2022-02-15 09:47:12 +01:00
Christian Beikov dc6ad33cfc HHH-10463 Implement function argument type inference 2022-02-15 09:04:50 +01:00
Christian Beikov 260c738a5a Get rid of some `getEntityMetamodel` uses 2022-02-15 09:03:55 +01:00
Christian Beikov 87638a9a2e Get rid of most walking stuff 2022-02-14 22:55:45 +01:00
Christian Beikov 1a71bb9787 Fix root validation for subqueries that appear in the on clause 2022-02-14 22:55:21 +01:00
Christian Beikov 0f02279f10 Implement partial null key handling and respect lazy flag regardless of fetch style 2022-02-14 20:13:53 +01:00
Andrea Boriero 3b6d25425a HHH-15073 Test criteria query built from JPA metamodel and involving primitive types 2022-02-14 09:34:28 +01:00
Yoann Rodière c1078b2612 HHH-15073 CriteriaPrimitiveIdTest: use only JPA interfaces that are available in Hibernate ORM 5 2022-02-14 09:34:28 +01:00
Yoann Rodière c4e763c5c5 HHH-15073 Test criteria query built from JPA metamodel and involving primitive types 2022-02-14 09:34:28 +01:00
Andrea Boriero d8a98af76e Fix LocalTime and OffsetTime parameter binding 2022-02-11 13:16:28 +01:00
Andrea Boriero 83306d588d Call to Query#getParameterValue(int position) with closed EntityManager must throw an IllegaStateException 2022-02-11 11:36:50 +01:00
Christian Beikov 5bfbc466eb Rename JPA copy compliance setting to `hibernate.criteria.copy_tree` 2022-02-10 18:24:23 +01:00
Andrea Boriero 07f3d6727f Fix native named query max results 2022-02-10 14:27:36 +01:00
Gavin King 74e1e6caad catch other cases where NPE indicates that a PostInitCallbackEntry is unready 2022-02-10 14:05:14 +01:00
Gavin King 9a98976b41 don't use NPE to indicate that a PostInitCallbackEntry is unready and needs to be re-queued
because:

- to anyone stepping through the code it looks like a bug
- nobody *reading* the code would have any way of guessing
  that this is behavior that can happen, much less that it's
  expected and correct
2022-02-10 12:16:16 +01:00
Andrea Boriero 6fcbe5f0a0 Fix parameter binding validation 2022-02-10 09:39:23 +01:00
Gavin King 437da23961 removing a questionable grammar rule seems to make implicit collection joins work 2022-02-09 22:05:21 +01:00
Gavin King 9ebac67737 change the new syntax for HQL collection-aggregates
this feels more consistent to me, and avoids introducing "new" syntax
2022-02-09 22:05:21 +01:00