I will add the check for non-get-named method if there are no objections, I
see no reason for not having it.

2015-11-24 13:25 GMT+03:00 Roman Shtykh <rsht...@yahoo.com.invalid>:

> +1 for adding support, particularly because in Scala we don't necessarily
> have get... and set... (an underscore can be used for that).
>
> Roman
>
>
>
> On Tuesday, November 24, 2015 5:39 PM, Alexey Kuznetsov <
> akuznet...@gridgain.com> wrote:
> 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
>

Reply via email to