Argument is not an array
java.lang.IllegalArgumentException: Argument is not an array
at net.kaleidos.hibernate.usertype.ArrayType.nullSafeGet(ArrayType.java:109)
at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:127)
Fixed enum to integer mapping issue: ArrayType.nullSafeGet expected getId() method on enum, but ArrayType.nullSafeSet used ordinal() result while saving
Caused by: java.lang.NoSuchMethodException: test.criteria.array.Like$Juice.getId()
at java.lang.Class.getMethod(Class.java:1670)
at net.kaleidos.hibernate.usertype.BidiEnumMap.<init>(BidiEnumMap.java:32)
at net.kaleidos.hibernate.usertype.ArrayType.idToEnum(ArrayType.java:154)
Not plugin will try to use a result of getId() method as an identifier or will use ordinal() if such method is missing.
The main reason why fixed issues have not been reproduced when running integration tests is that domain saving and retrieving should be in different sessions. Only in that case Hibernate will invoke nullSafeGet on the corresponding user type and will not use current session's cache.
Coverage increased (+5.55%) to 79.49% when pulling 22ab89b9ede35efa95fffce76cf62f8a372feea1 on mochalov:master into 1b90d71f9aa254679f6b3b87dfa5133d9004474d on kaleidos:master.
Coverage increased (+5.55%) to 79.49% when pulling eadb95786b66e76852a5632cfcf5ddc789f4f041 on mochalov:master into 1b90d71f9aa254679f6b3b87dfa5133d9004474d on kaleidos:master.
Coverage increased (+5.55%) to 79.49% when pulling eadb95786b66e76852a5632cfcf5ddc789f4f041 on mochalov:master into 1b90d71f9aa254679f6b3b87dfa5133d9004474d on kaleidos:master.
Fixed exception:
Fixed enum to integer mapping issue:
ArrayType.nullSafeGet
expectedgetId()
method on enum, butArrayType.nullSafeSet
usedordinal()
result while savingNot plugin will try to use a result of
getId()
method as an identifier or will useordinal()
if such method is missing.The main reason why fixed issues have not been reproduced when running integration tests is that domain saving and retrieving should be in different sessions. Only in that case Hibernate will invoke
nullSafeGet
on the corresponding user type and will not use current session's cache.