We are using JPA's createNativeQuery such that we get back a List<Object[]>
; see: https://stackoverflow.com/a/13701011/34806
Our Java code expects to be able to iterate through the list and get back Object arrays with a fixed number of "fields" (Object
s in the Object
array). However if any of those fields were null in the database, the Object[] array does not contain them, instead skipping such null fields entirely such that the "row" (Object[]
array in the List
) contains fewer fields than other rows -- this is obviously problematic.