Closed Bram80 closed 2 months ago
All the tests in the reproducer are green, but there is no testByteArrayEmpty
.
Please provide an actual reproducer of the issue.
Here you go :-)
Thanks for the reproducer.
This does not seem to originate in Spring Data JDBC, since it can be reproduced with just a NamedParameterJdbcTemplate
.
My first guess was a regression in the JDBC driver, but switching that arround doesn't seem to make a difference.
See the additional test and branches in https://github.com/schauder/issue-jdbc-1827-insert-null-array
I'll see what the Spring Framework team has to say.
@Bram80 assuming that https://github.com/spring-projects/spring-framework/issues/25679 might be the cause here: Does it help to set the following system property (can also be an entry in a spring.properties
file in the root of the classpath) - spring.jdbc.getParameterType.ignore=false
@jhoeller Setting the system property you mentioned solves the issue.
@jhoeller I'm going to close this issue, since the problem of the OP is resolved. Thanks for the help there.
We're receiving following stacktrace when persisting a byte array as null using Spring Data:
We're receiving this using
spring-boot-starter-parent
version3.3.1
, with version3.2.0
everythings works.Example implementation:
testByteArrayNull
test method doesn't work.testByteArrayNotNull
andtestByteArrayEmpty
test methods work fine.So we've a workaround by an using empty
Byte
array instead ofnull
. Although,null
should be possible as it was by earlier versions.I included a reproducable example. test-container-test.zip