grails-data-mapping
grails-data-mapping copied to clipboard
ArrayIndexOutOfBoundsException in CriteriaLoader.java
Steps to Reproduce
- define following domain class
class mytest { def my_data = "123" static hasMany = [childItems: mytest] }
- execute the following code
def mytest = new mytest() mytest.save(failOnError: true, flush: true) def tests = mytest.where { childItems.contains(mytest) }.findAll()
Expected Behaviour
yield an empty collection
Actual Behaviour
java.lang.ArrayIndexOutOfBoundsException in CriteriaLoader.java getResultRow line 161
result[i] = types[i].nullSafeGet( rs, columnAliases[pos], session, null );
columnAliases is an Array with 0 entries, while pos = 0 tries to retrieve the first element
Environment Information
- Operating System: Ubuntu 16.04
- GORM Version: gormVersion=6.1.10.RELEASE
- Grails Version (if using Grails): 3.3.8
- JDK Version: 1.8.0_201