Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMmJmZmEzYzkw...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16087?atlOrigin=eyJpIjoiMmJmZm...
) HHH-16087 (
https://hibernate.atlassian.net/browse/HHH-16087?atlOrigin=eyJpIjoiMmJmZm...
) Support @JdbcTypeCode(Types.VARBINARY) on char[] (
https://hibernate.atlassian.net/browse/HHH-16087?atlOrigin=eyJpIjoiMmJmZm...
)
Issue Type: Improvement Assignee: Unassigned Created: 24/Jan/2023 03:07 AM Fix Versions:
6.wishlist Priority: Major Reporter: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
@Column
@JdbcTypeCode(Types.VARBINARY)
private char[] charArray;
The above does not work, one gets an exception upon trying to persist:
org.hibernate.HibernateException: Unknown unwrap conversion requested: [C to [B :
`org.hibernate.type.descriptor.java.PrimitiveCharacterArrayJavaType` ([C)
at
org.hibernate.type.descriptor.java.JavaTypeHelper.unknownUnwrap(JavaTypeHelper.java:17)
at
org.hibernate.type.descriptor.java.AbstractClassJavaType.unknownUnwrap(AbstractClassJavaType.java:112)
at
org.hibernate.type.descriptor.java.PrimitiveCharacterArrayJavaType.unwrap(PrimitiveCharacterArrayJavaType.java:74)
at
org.hibernate.type.descriptor.java.PrimitiveCharacterArrayJavaType.unwrap(PrimitiveCharacterArrayJavaType.java:23)
at
org.hibernate.type.descriptor.jdbc.VarbinaryJdbcType$1.doBind(VarbinaryJdbcType.java:100)
at org.hibernate.type.descriptor.jdbc.BasicBinder.bind(BasicBinder.java:61)
at
org.hibernate.engine.jdbc.mutation.internal.JdbcValueBindingsImpl.lambda$beforeStatement$0(JdbcValueBindingsImpl.java:87)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at
org.hibernate.engine.jdbc.mutation.spi.BindingGroup.forEachBinding(BindingGroup.java:51)
at
org.hibernate.engine.jdbc.mutation.internal.JdbcValueBindingsImpl.beforeStatement(JdbcValueBindingsImpl.java:85)
at
org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.performNonBatchedMutation(AbstractMutationExecutor.java:93)
at
org.hibernate.engine.jdbc.mutation.internal.MutationExecutorSingleNonBatched.performNonBatchedOperations(MutationExecutorSingleNonBatched.java:40)
at
org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.execute(AbstractMutationExecutor.java:43)
at
org.hibernate.persister.entity.mutation.InsertCoordinator.doStaticInserts(InsertCoordinator.java:162)
at
org.hibernate.persister.entity.mutation.InsertCoordinator.coordinateInsert(InsertCoordinator.java:104)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2785)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:102)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:616)
at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:487)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:484)
at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:358)
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
at
org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1412)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:485)
at
org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:2277)
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:1942)
at
org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:426)
at
org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:169)
at
org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:267)
at
org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
(
https://hibernate.atlassian.net/browse/HHH-16087#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16087#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214- sha1:01e0849 )