I see. All index annotations will need the @JsonProperty annotation to
survive serialization then. I guess another side effect which will break
backward compatibility will be experienced by map-reduce queries on any
entity that contains these indexes. They will not return the indexed value
either since the json value will no longer contain them. Unless of course
you use @JsonProperty.

Thanks for letting me know about the change.

Deepak Bala

On Tue, Sep 25, 2012 at 9:04 PM, Brian Roach <ro...@basho.com> wrote:

> This is not a bug, it's a feature ;) The fact that the index values
> were were being serialized was actually not consistant with our other
> annotated fields, so I made the decision to bring it in line and not
> do so.
>
> I actually highlighted the change in the CHANGELOG:
>
> af12b6c - The default JSONConverter now supports multiple values via a
> @RiakIndex annotated Set<> (Integer or String). Note this also brings
> serialization/deserialization in line with our other annotaded fields
> in that these values will not be present in the resulting JSON. To
> override this behavior the Jackson @JsonProperty annotation can be
> supplied
>
> Thanks,
> Brian Roach
>
> On Tue, Sep 25, 2012 at 1:01 AM, Deepak Balasubramanyam
> <deepak.b...@gmail.com> wrote:
> > I switched to the java riak-client 1.0.6 to take it for a spin, and
> several
> > test cases of mine failed. Upon further investigation I found that any
> > member variable that contains the @RiakIndex annotation does not
> serialize
> > into Riak anymore. You can reproduce the problem with the following type
> >
> > @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
> > public class MyType
> > {
> >     public static final String SOME_NAME_STR_REFERENCE = "blah";
> >     @RiakKey
> >     private String myKey;
> >     @RiakIndex(name=SOME_NAME_STR_REFERENCE)
> >     private String indexedProp;
> > // Getters and setters go here
> > }
> >
> > Make a call to bucket.store(typeRef).execute() followed by a GET to
> > /riak/myBucket/myKey. The indexedProp element will be missing in the json
> > for calls made on riak-client version 1.0.6 but will be available when
> the
> > call is made from riak-client version 1.0.5.
> >
> > Thanks
> > Deepak Bala
> >
> > _______________________________________________
> > riak-users mailing list
> > riak-users@lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> >
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to