Andrea Boriero
7d13abf528
Add test
2020-02-17 18:07:00 +00:00
Andrea Boriero
484589c5b4
Fix BiDirectionalFetchImpl CircularFetchAssembler#assemble for collection initialization
2020-02-17 18:07:00 +00:00
Andrea Boriero
7de3be2492
Fix NPE in SingularAssociationAttributeMapping#resolveCircularFetch(...) method
2020-02-17 18:07:00 +00:00
Andrea Boriero
9633345dbb
Fix issue determining fetchablePath and fetchParent for PluralAttributes in LoaderSelectBuilder#createFetchableConsumer() method
2020-02-17 18:07:00 +00:00
Andrea Boriero
d34353e2a3
Revert "EntityCollectionPart#generateFetch() add TableGroupJoin to EntityCollectionPartTableGroup"
...
This reverts commit f5351addb8155bd85fbd38f5b989ef0a260bcf3f.
2020-02-17 18:07:00 +00:00
Andrea Boriero
8c377e9208
Fix issue with @ElementColletion of Embeddables
2020-02-17 18:07:00 +00:00
Andrea Boriero
a4330599c2
Fix SingularAssociationAttributeMapping identifyingColumnsTableExpression and inverseIdentifyingColumnsTableExpression values
2020-02-17 18:07:00 +00:00
Andrea Boriero
f3b2a1537b
Implemented SingularAssociationAttributeMapping circular fetch detection for ToOne with JoinTable
2020-02-17 18:07:00 +00:00
Andrea Boriero
2afd4c8123
Avoid EntityFetchJoinedImpl visiting the EntityIdentifierMapping
2020-02-17 18:07:00 +00:00
Andrea Boriero
bd28b54482
EntityCollectionPart#generateFetch() add TableGroupJoin to EntityCollectionPartTableGroup
2020-02-17 18:07:00 +00:00
Andrea Boriero
8c16e7cfe9
Fix issue with AbstractEntityPersister and the creation of the RootTableGroup
2020-02-17 18:07:00 +00:00
Andrea Boriero
16d81eb4bf
Refactoring
2020-02-17 18:07:00 +00:00
Steve Ebersole
3222b52ab2
continued work on circular fetch detection. still need to work through the cases involving embeddables "in between"
2020-02-17 18:07:00 +00:00
Steve Ebersole
00b5a700eb
continued work on circular fetch detection. still need to work through the cases involving embeddables "in between"
2020-02-17 18:07:00 +00:00
Steve Ebersole
4f750cdc55
initial work on circular fetch detection across embeddables
2020-02-17 18:07:00 +00:00
Andrea Boriero
8c806a5a16
Fix issue with TableReference resolution
2020-02-17 18:07:00 +00:00
Andrea Boriero
cb5fe2645a
Code Clean up
2020-02-17 18:07:00 +00:00
Andrea Boriero
c4887356ca
Move more tests to o.h.orm.test
2020-02-17 18:07:00 +00:00
Andrea Boriero
67f77efa91
AttributeOverride add more tests
2020-02-17 18:07:00 +00:00
Andrea Boriero
436060008b
Fix empty collection not initialized
2020-02-17 11:24:01 -06:00
Andrea Boriero
08b08c0d81
Re-enabled few more tests
2020-02-17 11:24:01 -06:00
Andrea Boriero
2660007df9
Merge remote-tracking branch 'upstream/master' into wip/6.0_merge_24
2020-02-14 11:36:06 +00:00
Sanne Grinovero
760386d2cf
HHH-13864 Cosmetic change of format when reporting version number
2020-02-13 16:41:01 +00:00
Andrea Boriero
2f2d30e4e5
HHH-13861 Expose the doWork() and doReturningWork() APIs on StatelessSession as well
2020-02-13 09:33:00 +00:00
Sanne Grinovero
2ed15445c6
HHH-13859 Removing unused import
2020-02-11 15:11:07 +00:00
Sanne Grinovero
d3fdb657d6
HHH-13859 Avoid attempting to index a module-info.class via Jandex
2020-02-11 15:11:07 +00:00
Andrea Boriero
5defe54d31
HHH-13856 Fix Oracle failing tests
2020-02-10 14:52:32 +00:00
gavinking
bb10a8ce27
As suggested by @romainmoreau and @aklish, use 'cascade' in H2 1.4.200+
...
See https://github.com/hibernate/hibernate-orm/pull/3093
Also fix up some confusing/wrong handling of H2 version numbers and
delete some obsolete commented code.
2020-02-09 15:49:32 +01:00
Sanne Grinovero
90b69ffc7d
HHH-13854 Allow extensions of StandardServiceRegistryBuilder to ignore Environment variables
2020-02-07 16:55:02 +00:00
Sanne Grinovero
11b1623774
HHH-13804 Update comments in Environment to suggest the ability to inject an externally defined ProxyFactoryFactory instance
2020-02-07 13:41:29 +00:00
Sanne Grinovero
8043e49384
HHH-13851 Remove a dead code field from PojoEntityTuplizer
2020-02-07 13:28:41 +00:00
Sanne Grinovero
0964b881f7
HHH-13851 Rework initialization of ProxyFactoryFactory, allow some code reuse from SPI
2020-02-07 13:28:32 +00:00
Sanne Grinovero
52ca2703f3
HHH-13850 Clear the BytecodeProvider caches both after SessionFactory creation and stop
2020-02-07 13:22:37 +00:00
Sanne Grinovero
5c81089d65
HHH-13849 Convert BytecodeProvider into a Service as well
2020-02-07 13:21:13 +00:00
Sanne Grinovero
e19acd5a9c
HHH-13849 Convert ProxyFactoryFactory into a Service, scope it to SessionFactory
2020-02-07 13:21:10 +00:00
Steve Ebersole
844adb4d45
rework collection loading state management - remove the "temp" load collections in various PersistentCollection impls
2020-02-05 13:23:47 -06:00
Steve Ebersole
8fd1f9a536
rework collection loading state management - remove the "temp" load collections in various PersistentCollection impls
2020-02-05 18:06:08 +01:00
gavinking
cb3560de96
Allow binary literals to be specified in a Java byte-array-like format
...
Allow you to write x'DEADBEEF' as {0xDE, 0xAD, 0xBE, 0xEF}.
For now I'm being quite restrictive here:
- byte literals must be written in hexadecimal not in decimal
- they must be exactly two digits in length
(I would like to allow decimal format but I think that would start to
collide with other rules with braces in the grammar.)
2020-02-05 16:33:08 +01:00
gavinking
ddaff28838
Add hexadecimal binary literals with standard SQL syntax
...
And fix up the parsing and formatting in VarbinaryTypeDescriptor which
was inconsistent with how the JDBC drivers handle the conversion to
signed bytes.
2020-02-05 16:33:08 +01:00
Frank Doherty
4b037cdf8f
HHH-13792 evict entity cache after transaction has committed for read-write cache access strategy
...
- changed EntityReadWriteAccess to remove the no-op unlockRegion method (now uses the method inherited from
AbstractCachedDomainDataAccess, which calls evictAll)
- changed AbstractReadWriteAccess to add a no-op removeAll method (as this is called by the constructor in
BulkOperationCleanupAction.EntityCleanup, during the transaction)
- added new file ReadWriteCacheTest with some test scenarios:
- testDeleteHQL/testDeleteNativeQuery/testUpdateHQL/testUpdateNativeQuery which confirm that the fix corrects the
scenario where stale entities could be loaded into the cache and remain there (because the eviction was
happening before the transaction had committed)
- testDelete/testUpdate show that entity updates/deletions were not affected by this issue (only HQL/native queries)
2020-02-05 15:47:13 +01:00
Hyunjin Choi
07ffd63b3a
Fix typos in AbstractEntityPersister's generateSQLDeletStrings() method
...
Fix typo.
2020-02-05 15:27:16 +01:00
Andrea Boriero
eb43734658
Fix compilation errors after merge
2020-02-05 12:16:41 +00:00
Andrea Boriero
f77fb75639
Merge remote-tracking branch 'upstream/master' into wip/6.0_merge_23
2020-02-05 11:37:36 +00:00
gavinking
ae291bf04f
Prevent overflow when persisting Durations
...
Durations should be converted to BigDecimals for storage in NUMERIC columns.
(I missed this change when I merged my work from the previous branch.)
2020-02-04 13:55:22 +01:00
gavinking
5401f4fcfd
Fix rendering of boolean literals on Oracle, SQL Server and possibly others
...
These databases do not understand 'true' and 'false' but that's what we
generated for a boolean literal in the HQL.
2020-02-04 13:46:57 +01:00
gavinking
1706141ffc
H2 supports 'true' and 'false' boolean literals
2020-02-04 13:44:48 +01:00
gavinking
398dcfffeb
Fill in implementation of HQL hexadecimal literals
...
And add tests for hex and BigDecimal/BigInteger literals
2020-02-02 09:58:14 +01:00
gavinking
0b6e071f4a
Remove obsolete token from list in parser
2020-02-02 09:41:06 +01:00
gavinking
558e757a33
Improve test for function parameter binding
2020-02-01 12:26:06 +01:00
Sanne Grinovero
ddb810510c
HHH-13838 Allow extension of PersistenceXmlParser
2020-01-31 18:32:24 +00:00
Christian Beikov
c41c6aaf7d
Some fixes for delete and update statements
2020-01-31 17:56:12 +01:00
gavinking
fe4f98186a
Remove InterbaseDialect, PointbaseDialect, and ProgressDialect
...
None of these dialects seem to be maintained, and the databases themselves
look to be moribund.
2020-01-31 10:32:41 -06:00
gavinking
47c001b00c
Remove MckoiDialect
...
The last release of this database was in 8 years ago, and nobody is using it
according to StackOverflow.
2020-01-31 10:28:23 -06:00
gavinking
b1de5d6703
Remove JDataStoreDialect
...
It is:
- not used (no JDataStore questions on StackOverflow)
- not maintained
- not of high quality
2020-01-31 17:21:32 +01:00
gavinking
57f7c7bcd3
Improve Javadoc in TypeNames
2020-01-31 11:55:45 +01:00
gavinking
294f16f73d
hibernate.legacy_limit_handler no longer has any effect
...
Therefore:
- mark USE_LEGACY_LIMIT_HANDLERS deprecated
- delete the tests for this workaround (which were broken anyway)
2020-01-31 11:21:29 +01:00
gavinking
6a8d0bf801
Fix grammar
2020-01-31 11:19:37 +01:00
gavinking
2175aea8ad
File headers and newlines
2020-01-31 10:58:42 +01:00
Nathan Xu
19e35b86cc
HHH-13809 Various improvements in the user guidesw
2020-01-31 09:30:28 +00:00
Sanne Grinovero
cc7c7d7ee3
HHH-13837 Initialize the Hibernate VERSION as a real constant
2020-01-30 22:05:36 +00:00
Sanne Grinovero
5f302c57a7
HHH-13831 Avoid log level check within complex loops
2020-01-30 22:05:36 +00:00
gavinking
41577dcec4
Map Durations to NUMERIC instead of BIGINT
2020-01-30 14:01:34 -06:00
gavinking
9a061c5c10
Render HQL Boolean literals correctly on dialects which use BIT for boolean
2020-01-30 14:01:34 -06:00
gavinking
0d3b130258
Remove support for octal literals
...
For the datetime stuff we need integer literals with leading zeros, and
surely there is not a single breathing person who has ever written an
octal literal in HQL.
2020-01-30 14:01:34 -06:00
gavinking
42de2976e1
don't swallow connection errors
...
This bug made it *really* hard to figure out what was going on with
rejected connections!
2020-01-30 14:01:34 -06:00
gavinking
b085730dd8
Use autoboxing in BooleanTypeDescriptor
2020-01-30 14:01:34 -06:00
gavinking
1989635bc2
Clean up use of generic types in EnumValueConverters
...
Use the "self type" idiom correctly.
2020-01-30 14:01:34 -06:00
gavinking
d5096fc660
TinyInt should not use Short here
2020-01-30 14:01:34 -06:00
gavinking
41cb827267
Delete two obsolete ICS classes
2020-01-30 14:01:34 -06:00
gavinking
e4379bea4b
Improve javadoc
2020-01-30 14:01:34 -06:00
gavinking
a63d23f724
Use switch for consistency
2020-01-30 14:01:34 -06:00
gavinking
eb71ec395d
Oracle doesn't recognize "as", so use the Dialect to decide
2020-01-30 14:01:34 -06:00
gavinking
5cae462f7a
Let ClobTypeDescriptor handle Strings
...
Just like BlobTypeDescriptor can handle byte[] arrays
2020-01-30 14:01:34 -06:00
gavinking
3ab747517d
Use OID instead of BYTEA for @Lob mappings on PostgreSQL
2020-01-30 14:01:34 -06:00
gavinking
c8f477c962
A couple of default properties went missing from the dialects
2020-01-30 14:01:34 -06:00
gavinking
4f5b37c9c4
Use SequenceSupport everywhere instead of deprecated methods of Dialect
2020-01-30 14:01:34 -06:00
gavinking
f6eaaca824
Fix up Dialect auto-detection
...
- make it work for DriverManagerConnectionProviderImpl
- improve logging and some confusing exceptions
- make it respect explicit database setting properties
2020-01-30 14:01:34 -06:00
gavinking
95930820af
Support for timezones
...
- add TimestampWithTimeZoneDescriptor and use it in OffsetDateTimeJD
and ZonedDateTimeJD
- add ZoneOffsetJavaDescriptor for ZoneOffset attributes
- clean up string rendering for temporal types using ISO formats;
note that they do not need to implement objectToSQLString()
since they cannot be discriminators
Note that at this time very few databases have meaningful support
for the ANSI-standard TIMESTAMP WITH TIME ZONE type. This limits
the usefulness of TimestampWithTimeZoneDescriptor for now.
Also add in some missing but needed type mappings for temporal types
2020-01-30 14:01:34 -06:00
gavinking
5a3838dfa6
Simplify the whole SqmFunctionDescriptor hierarchy
...
And make the various function implementations work in more common ways.
- remove some unnecessary flexibility
- simplify some function descriptors to do their work during render()
- fix generics of QueryLiteral
- fix DerbyConcatEmulation
2020-01-30 14:01:34 -06:00
gavinking
effec02964
Automatically generate check constraints for boolean and enum attributes
...
And make enums map to TINYINT by default.
2020-01-30 14:01:34 -06:00
gavinking
992b390fce
Get type-specific column length/precision/scale defaulting working again
...
And fix resulting breakage to envers
2020-01-30 14:01:34 -06:00
gavinking
f0d93200b5
Add hibernate.dialect.show_hql_functions
...
Very useful feature for logging available functions
2020-01-30 14:01:34 -06:00
gavinking
96c948b06b
Changes to tests
...
First, disable tests that fail because of loss of indirected parameter binding.
On the other branch, the index of a HQL parameter wasn't passed directly through
as the index of the JDBC parameter. On this branch it seems to be. This causes a
problem for fancy HQL functions like overlay() and pad() which sometimes
duplicate/reorder HQL arguments in the generated SQL.
Also reenable tests that now pass.
Also fixed a rather badly-written test that failed for me.
- called Thread.sleep(), wasting a whole second
- failed on non-slow machines
2020-01-30 14:01:34 -06:00
gavinking
5b18a4048d
Make parenthesized expressions work in HQL
...
Previously, parenthesized expression were broken.
2020-01-30 14:01:34 -06:00
gavinking
95a291575e
Hacky solution to make count(e) work again
...
(It wasn't working on the new 6 branch)
2020-01-30 14:01:34 -06:00
gavinking
28232427ce
Got unary +, - working again
...
(They were unimplemented on the new 6 branch)
2020-01-30 14:01:34 -06:00
gavinking
9565d499af
Big merge of my branch with new Hibernate 6 codebase
...
Lots of new functionality here related to HQL functions, SQL
dialects, and date/time handling.
2020-01-30 14:01:33 -06:00
Davide D'Alto
4cd9dd30a0
HHH-13831 Rename test class to EventListenerDuplicationStrategyTest
2020-01-30 18:09:23 +01:00
Davide D'Alto
0268ba9a33
HHH-13831 Test listeners error replacement strategy
2020-01-30 18:09:23 +01:00
Davide D'Alto
e38d2be431
HHH-13831 Test listener keep original replacement strategy
2020-01-30 18:09:23 +01:00
Davide D'Alto
6670d03493
HHH-13831 Add tests for multiple listeners
...
We want to test what happens when we apply a replacement strategy
that doesn't match all listeners.
2020-01-30 18:09:23 +01:00
Davide D'Alto
695e3a084e
HHH-13831 Clean up existing tests for listeners
2020-01-30 18:09:23 +01:00
Davide D'Alto
7bf632e5c5
HHH-13831 Fix the way we keep track of the callers in test
2020-01-30 18:09:23 +01:00
Davide D'Alto
c0a2b4f424
HHH-13831 Add missing placeholder to log message
2020-01-30 18:09:23 +01:00
Steve Ebersole
0a2dd4e126
HHH-13831 Refresh listeners when one is replaced
2020-01-30 18:09:23 +01:00
Steve Ebersole
2f86c4983f
HHH-13831 Refresh listeners when one is replaced
2020-01-30 18:09:23 +01:00
Davide D'Alto
739ca869af
HHH-13831 Test for replacing listeners
2020-01-30 18:09:23 +01:00
Davide D'Alto
5c1cc35f98
HHH-13831 Refresh listeners when one is replaced
2020-01-30 18:09:23 +01:00
Christian Beikov
89ebcfbc32
Allow to invoke list() operation also without unique filtering
2020-01-30 17:24:49 +01:00
Christian Beikov
7b064afbd3
Use type inference for every added when/otherwise arm for case expressions
2020-01-30 17:23:54 +01:00