Skip to content

Commit d50e3f9

Browse files
committed
HHH-19681 - Fix for issue
Signed-off-by: Jan Schatteman <[email protected]>
1 parent 48e39da commit d50e3f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@ protected Object[] getArray(
190190
}
191191

192192
protected <X> X getArray(BasicExtractor<X> extractor, java.sql.Array array, WrapperOptions options) throws SQLException {
193-
if ( array != null && getElementJdbcType() instanceof AggregateJdbcType ) {
194-
final AggregateJdbcType aggregateJdbcType = (AggregateJdbcType) getElementJdbcType();
193+
final JdbcType jdbcType = getElementJdbcType();
194+
if (array != null
195+
&& jdbcType instanceof AggregateJdbcType
196+
&& ((AggregateJdbcType) jdbcType).getEmbeddableMappingType() != null) {
197+
final AggregateJdbcType aggregateJdbcType = (AggregateJdbcType) jdbcType;
195198
final EmbeddableMappingType embeddableMappingType = aggregateJdbcType.getEmbeddableMappingType();
196199
final Object rawArray = array.getArray();
197200
final Object[] domainObjects = new Object[Array.getLength( rawArray )];

0 commit comments

Comments
 (0)