Skip to content

Commit

Permalink
HHH-18582 Throw explicit error when trying to map nested arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
mbladel committed Sep 20, 2024
1 parent f241f9b commit d2371f0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Collection;

import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.SharedSessionContract;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.jdbc.BinaryStream;
Expand Down Expand Up @@ -70,7 +71,7 @@ public BasicType<?> resolveType(
|| elementJavaTypeClass != null && elementJavaTypeClass.isArray()
&& elementJavaTypeClass != byte[].class ) {
// No support for nested arrays, except for byte[][]
return null;
throw new MappingException( "Nested arrays (with the exception of byte[][]) are not supported" );
}
final ArrayJavaType<T> arrayJavaType;
if ( getElementJavaType() == elementType.getJavaTypeDescriptor() ) {
Expand Down

0 comments on commit d2371f0

Please sign in to comment.