When using the Multiset fetch strategy on a collection whose entity view contains a LocalDate typed value, an exception is thrown when attempting to convert the database column to a java.sql.Timestamp before converting to a LocalDate.
Expected behavior
The database column for a LocalDate should be converted from a java.sql.Date instead of a java.sql.Timestamp object.
Actual behavior
java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
at java.sql/java.sql.Timestamp.valueOf(Timestamp.java:196)
at com.blazebit.persistence.view.impl.type.LocalDateBasicUserType.fromString(LocalDateBasicUserType.java:36)
at com.blazebit.persistence.view.impl.type.LocalDateBasicUserType.fromString(LocalDateBasicUserType.java:30)
at com.blazebit.persistence.view.impl.objectbuilder.transformer.MultisetTupleTransformer.transform(MultisetTupleTransformer.java:78)
at com.blazebit.persistence.view.impl.objectbuilder.transformator.TupleTransformator.transform(TupleTransformator.java:84)
at com.blazebit.persistence.view.impl.objectbuilder.transformator.TupleTransformator.transform(TupleTransformator.java:77)
at com.blazebit.persistence.view.impl.objectbuilder.ChainingObjectBuilder.build(ChainingObjectBuilder.java:51)
at com.blazebit.persistence.impl.builder.object.PreProcessingObjectBuilder.build(PreProcessingObjectBuilder.java:46)
at com.blazebit.persistence.impl.query.ObjectBuilderTypedQuery.getResultList(ObjectBuilderTypedQuery.java:71)
at com.blazebit.persistence.impl.query.ObjectBuilderTypedQuery.getSingleResult(ObjectBuilderTypedQuery.java:49)
Steps to reproduce
Introduce a collection on an entity view that uses the Multiset fetch strategy whose entity view contains a LocalDate field
Description
When using the Multiset fetch strategy on a collection whose entity view contains a LocalDate typed value, an exception is thrown when attempting to convert the database column to a java.sql.Timestamp before converting to a LocalDate.
Expected behavior
The database column for a LocalDate should be converted from a java.sql.Date instead of a java.sql.Timestamp object.
Actual behavior
Steps to reproduce
Introduce a collection on an entity view that uses the Multiset fetch strategy whose entity view contains a LocalDate field
Environment
Version: 1.6.11
JPA-Provider: hibernate DBMS: postgres 13.3 Application Server: tomcat