Skip to content

Commit 98cfad5

Browse files
committed
HHH-19681 - Fix for issue
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
1 parent 67637da commit 98cfad5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc/ArrayJdbcType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ protected <T> Object[] getArray(BasicBinder<?> binder, ValueBinder<T> elementBin
169169
protected <X> X getArray(BasicExtractor<X> extractor, java.sql.Array array, WrapperOptions options)
170170
throws SQLException {
171171
final JavaType<X> javaType = extractor.getJavaType();
172-
if ( array != null && getElementJdbcType() instanceof AggregateJdbcType aggregateJdbcType ) {
172+
if (array != null
173+
&& getElementJdbcType() instanceof AggregateJdbcType aggregateJdbcType
174+
&& aggregateJdbcType.getEmbeddableMappingType() != null) {
175+
173176
final EmbeddableMappingType embeddableMappingType = aggregateJdbcType.getEmbeddableMappingType();
174177
final Object rawArray = array.getArray();
175178
final Object[] domainObjects = new Object[Array.getLength( rawArray )];

0 commit comments

Comments
 (0)