Commit Graph

10525 Commits

Author SHA1 Message Date
Nathan Xu b7ae588768 HHH-14227 Insert statements are not ordered with entities that use inheritance and reference a subclass 2020-10-05 13:42:21 +01:00
Andrea Boriero b638018390 HHH-14247 Fix automatic releease script, changelog.txt contains wrong Jira release url 2020-10-05 10:13:55 +01:00
Hibernate-CI fa74cd36d0 5.4.23-SNAPSHOT 2020-09-30 17:46:56 +00:00
Hibernate-CI 8b52c403db 5.4.22.Final 2020-09-30 17:39:13 +00:00
Nathan Xu 18bbc9fd5e HHH-14231 Fix ClassCastException in ScrollableResultsImpl for primitive array value 2020-09-30 18:16:35 +01:00
Dmitry Gusev e752b8d191 HHH-14242 Micro optimisations of ActionQueue: redundant branch evaluation 2020-09-30 17:34:27 +01:00
Sanne Grinovero d959098ec7 HHH-14217 Minor optimisations in the highlighting formatter implementation 2020-09-30 17:01:07 +01:00
Sanne Grinovero 758de18531 HHH-14217 Code style 2020-09-30 17:01:02 +01:00
Gavin King 6f9b650bcb HHH-14217 Add syntax highlighting to the logged SQL
Using ANSI escape codes

Must be explicitly enabled using hibernate.highlight_sql
2020-09-30 17:00:57 +01:00
Gavin King c4ee4b1033 HHH-14203 DB2 requires the restrict keyword to drop the schema
The 'restrict' keyword is required on DB2.
2020-09-30 16:04:48 +01:00
Gavin King 94b819e70c HHH-14238 Option to include collection fields in the default fetch group
There is no good reason to lazily-instantiate a collection
wrapper, since that operation never requires access to the
database.

See discussion here:

   https://github.com/hibernate/hibernate-reactive/issues/374
2020-09-30 15:36:54 +01:00
Andrea Boriero 6eaa3f4415 HHH-14220 Fix failure with Oracle 2020-09-29 12:29:26 +01:00
Yanming Zhou 41e94dfab1 HHH-14205 Replace StringBuffer with StringBuilder
Avoid unnecessary synchronization
2020-09-29 11:35:59 +01:00
Nathan Xu f39089bf4e HHH-14197 Criteria API doubly-nested subquery generates invalid SQL - missing subquery root 2020-09-29 11:35:59 +01:00
Moritz Becker 69e485e5bd HHH-13201 - do not set empty text on collection join parent without queryable collection 2020-09-29 11:35:59 +01:00
Jan-Willem Gmelig Meyling a8a177886e HHH-14198 - Expose CompositeUserTypes through JPA Metamodel
Composite User Types work like regular Composite Types (like Embeddable) in HQL. However, because they cannot be represented in the JPA metamodel, libraries like [GraphQL for JPA](https://github.com/jcrygier/graphql-jpa) or [Blaze-Persistence](https://persistence.blazebit.com/) cannot fully utilize them. In order to make the composite property names available to these libraries, it would be nice to optionally expose these attributes as embedded attributes. This pull request aims to make that change and makes it configurable through a custom setting.

Composite User Types are a common solution for mapping composite interfaces. A common example is for example `Money` from the Java Money API (JSR-354), for which composite user types are implemented in [Jadira](http://jadira.sourceforge.net/usertype-userguide.html).

I know Composite User Types are currently not consiered in Hibernate 6.x. See also [this](https://hibernate.zulipchat.com/#narrow/stream/132094-hibernate-orm-dev/topic/CompositeUserType) Zulip thread. I am not sure if Hibernate 6.x will even have multi column types, which I presume would be a requirement to even introduce Composite User types back at some point. Usually Embeddables are a much easier, suitable mechanism for composite user types. But Embeddables are not always a viable alternative, because Embeddables require the type to be subclassed (as an interface cannot be mapped, and the type may not solely comprise fields that can be mapped to a simple basic type). To deal with this exact problem, `MonetaryAmounts` are still mapped as composite user type. There also have been suggestions to the JPA Spec to consider `AttributeConverters` for Embeddables for pracitcally the same purpose (which I think is going to be a mess of an implementation). See: https://github.com/eclipse-ee4j/jpa-api/issues/105

Anyways, regardless of whether this gets integrated in 5.x, I don't expect it to be integrated in 6.x unless we also reintroduce Composite User Types. I am willing to contribute Composite User Types for 6.x if people see benefit in it and think it can be done in the first place.
2020-09-29 11:35:59 +01:00
Jan-Willem Gmelig Meyling 69ddb4f782 HHH-14223 - Consider formulaTemplates in ID mapping for formula dereference 2020-09-29 11:35:59 +01:00
kubo 4c364a159a HHH-14223 - nullpointer exception on @JoinFormula with implicit join 2020-09-29 11:35:59 +01:00
Nathan Xu 14a72bcf8a HHH-13058 fix issue left join root cannot be replaced by correlated parent in subquery 2020-09-29 11:35:59 +01:00
Nathan Xu d0e22ddb20 HHH-14206 Auto-apply converter not applied to primitives 2020-09-29 11:35:59 +01:00
Christian Beikov 42cb22cae4 HHH-14212 Rename trigger entity to avoid keyword collision on Oracle 2020-09-29 11:35:59 +01:00
Nathan Xu a77f10cdab HHH-14212 fix Fetch Graph by simply returning false in TwoPhaseLoad#getOverridingEager() when Fetch Graph is being enforced 2020-09-29 11:35:59 +01:00
Nathan Xu ce70858df3 HHH-14212 revert back HHH-8776 (retaining testing case) 2020-09-29 11:35:59 +01:00
Nathan Xu c0a7b66273 HHH-14212 revert back HHH-14097 (retaining testing case) 2020-09-29 11:35:59 +01:00
Nathan Xu d1f9469cac HHH-14212 revert back HHH-14124 (retaining testing case) 2020-09-29 11:35:59 +01:00
Nathan Xu cadc3bf9dc HHH-14213 fix query numeric literal (integer representation) parsing exception message 2020-09-29 11:35:59 +01:00
Nathan Xu dd74a613cc HHH-14218 fix some typos in code comments 2020-09-29 11:35:59 +01:00
Christian Beikov 0db25441b0 HHH-14201 Fix test issues of NaturalIdDereferenceTest 2020-09-29 11:35:59 +01:00
Christian Beikov a32afda0ec HHH-14148 Fix ANTLR grammar non-determinism 2020-09-29 11:35:59 +01:00
Nathan Xu 4e99460460 HHH-14148 fix issue mapping order SQL fragment could produce incorrect SQL 2020-09-29 11:35:59 +01:00
Nathan Xu b33972b44e HHH-14201 fix HQL JOIN order issue 2020-09-29 11:35:59 +01:00
Yanming Zhou a9887cb7d2 HHH-14219 Fix duplicated rows of sequence table
if generator is shared by multiple entities
2020-09-29 11:35:59 +01:00
Andrea Boriero 21e2c5b2f1 HHH-14220 Skip test when bytecode provider is Javassist 2020-09-29 11:35:59 +01:00
Andrea Boriero ebe9756909 HHH-14220 Add test for issue 2020-09-29 11:35:59 +01:00
Sanne Grinovero d16799c2a4 HHH-14236 Improve efficiency of ForeignKeyKey 2020-09-28 16:10:58 +01:00
Andrea Boriero cddb67f103 HHH-14220 EnhancementException failure with MappedSuperclass with a un-mapped collection 2020-09-28 16:10:52 +01:00
Yanming Zhou a047e9a136 HHH-14230 Fix generics to avoid ClassCastException 2020-09-28 12:45:04 +01:00
Gavin King bc25867826 HHH-14204 Schema validator should be more forgiving of column type mismatches 2020-09-09 18:02:07 +01:00
Falko Modler 15673f5d2e HHH-14031 Update h2 to 1.4.197
Notes:
- h2 1.4.197+ does not support ns precision by default anymore
- h2 DateTimeUtils.resetCalendar() is required for many tests to avoid failures due to h2 internal caching
2020-09-09 11:28:55 +01:00
Sanne Grinovero a1f7e68902 HHH-9422 Metamodel Generator should close streams opened to persistence.xml and referenced mapping files 2020-09-02 12:32:02 +01:00
Andrea Boriero 68acb2edfa HHH-14199 fix the error when running 'setDataBase' gradle task 2020-09-01 10:32:39 +01:00
Nathan Xu b36803cecf HHH-14199 fix the error when running 'setDataBase' gradle task 2020-09-01 08:36:17 +01:00
Hibernate-CI baea15f7c7 5.4.22-SNAPSHOT 2020-08-27 10:58:45 +00:00
Hibernate-CI 31f8d9efb6 5.4.21.Final 2020-08-27 10:36:27 +00:00
Gavin King 55b46f1855 HHH-14153 refactoring after HHH-14153
- avoid use package-scoped instance felds
- remove copy/pasted code

Note: I don't hate package-scoped final fields, but I
know other folks tend to. So let's go with template
methods instead.
2020-08-27 09:56:54 +01:00
Gavin King a49795549a HHH-14153 Make buildAppropriateStatementExecutor() protected
Hibernate Reactive might ultimately need to override
this method, though it doesn't right now.

Relates to HHH-14153.
2020-08-27 09:56:48 +01:00
Gavin King 6e9b488ec1 HHH-14153 add test
By NathanQingyangXu

See https://github.com/hibernate/hibernate-orm/pull/3508
2020-08-27 09:56:40 +01:00
Gavin King 9dd2d94afb HHH-14153 further optimization for single-table HQL update
This extends the optimization for single-table HQL bulk
updates to the case where the where clause touches multiple
tables and we can use a subselect to collect the ids that
we need to update.
2020-08-27 09:56:22 +01:00
Gavin King f182b3b366 HHH-14153 clean up BasicExecutor and friends
introduces InsertExecutor and UpdateExecutor since we're
going to be introducing specific optimizations relating
to single-table updates

relates to HHH-14153
2020-08-27 09:56:15 +01:00
Gavin King 564c05a65a HHH-14153 optimize away temp table for single-table HQL update
When a HQL bulk update query only touches a single table,
use BasicExecutor instead of MultiTableUpdateExecutor.

This is an alternate implementation to the one proposed by
@NathanQingyangXu in #3508 and loosely based on that work.
2020-08-27 09:56:05 +01:00