Igniters,
I have such class in ignite-1.4
class Test(
@Id @ScalaCacheQuerySqlField(index = true) val id: Long = 0L,
val name: String = null,
aStatus: ListStatus,
val ruleID: Long = 0L) extends Serializable {
private val intStatus = enumToByte(aStatus)
@ScalaCacheQuerySqlField(index = true) def status: ListStatus =
byteToEnum(ListStatus.values, intStatus)
}
As part of my tests of upcoming ignite 1.5 I run my code and get exception
like this:
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
initialize property 'status' for key class 'class java.lang.Long'
and value class 'class my.tester.sql.Test'. Make sure that one of these
classes contains respective getter method or field.
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.buildClassProperty(GridQueryProcessor.java:1512)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.processClassMeta(GridQueryProcessor.java:1393)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:241)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:374)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1015)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:786)
After some debug I found that GridQueryProcessor tries to find method with
"get", but I have method without "get" in name.
I think we should add support for such use case, when user declare
getters/setters without using "get/set" prefixes.
Thoughts?
--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com