-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HHH-10999 Array datatypes module #1499
Conversation
Thanks for the Pull Request. Did you sign the CLA? |
Good work. For PostgreSQL, it works nicely. I tried it also on H2, Oracle, SQL Server and MySQL and the main issue that the JDBC drivers do not implement the Since we are reworking the types for 6.0, we need to take into consideration arrays as well, but first, we need to see how to address them in a generic fashion. If we are to add support for ARRAYS. we need to cover most database systems in order to add the TypeDescriptors in the generic package. |
Unless it has changed and invalidated old signatures in the past 8 months or so, I have signed it. I've thought of several bugs in the current PR, relating to multi-dimensional javatype registration and that of primitive arrays, but their time will probably come with 6.0. Meanwhile, we can iron this out as an optional module for 5.x. |
Add DialectChecks test for arrays to the tests
I made some changes to the tests to be compatible with HyperSQL and discovered bugs that need addressing. Currently three tests fail and it's not the fault of the tests. |
… and HyperSQL compatible syntax
…stgreSQL and HyperSQL compatible syntax" This reverts commit 4be6264.
Currently known problems/tasks:
|
Implement extractHashCode and areEqual.
It's almost ready. Currently one test fails, because of an error in diff --git a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/LocalDateJavaDescriptor.java b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/LocalDateJavaDescriptor.java
index d911e0f..f640c53 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/LocalDateJavaDescriptor.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/LocalDateJavaDescriptor.java
@@ -42,7 +42,7 @@ public class LocalDateJavaDescriptor extends AbstractTypeDescriptor<LocalDate> {
@Override
public LocalDate fromString(String string) {
- return (LocalDate) LocalDateType.FORMATTER.parse( string );
+ return LocalDate.parse( string, LocalDateType.FORMATTER );
}
@Override An analogous solution will probably have to be applied to the other Java 8 time types, because the same mistake is in all of them. There are some warnings about type registration on start-up that also need to be looked at. |
Optimize to ignore surrogate pairs. StringBuilder doesn't check, so appending one char at a time is OK.
It seems primitive arrays are since supported in pgjdbc: pgjdbc/pgjdbc#887 |
Superseded by #3799 |
What works:
EntityManager
interface.EntityManager
interface.What doesn't work:
columnDefinition
on thejavax.persistence.Column
annotation.TODO list without changes to core:
TODO list with core changes: