Fix load of entity with Date[] field
This commit is contained in:
parent
15121842f1
commit
e08a7665c8
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.type.descriptor.java;
|
package org.hibernate.type.descriptor.java;
|
||||||
|
|
||||||
import java.sql.Time;
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.sql.Types;
|
import java.sql.Types;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
|
@ -236,7 +235,7 @@ public class JdbcTimestampJavaTypeDescriptor extends AbstractTemporalJavaTypeDes
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return new Date( value.getTime() );
|
return new Timestamp( value.getTime() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@ import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.OrderColumn;
|
import jakarta.persistence.OrderColumn;
|
||||||
|
import jakarta.persistence.Temporal;
|
||||||
|
import jakarta.persistence.TemporalType;
|
||||||
|
|
||||||
public class DateArrayTest extends BaseCoreFunctionalTestCase {
|
public class DateArrayTest extends BaseCoreFunctionalTestCase {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue