Problem with lists in queries response

gfsilva92 commented :

Dgraph server version: 1.1.0
Dgraph client version: 1.1.0

There are two different moments.

  • Creation moment, where I create a concept with a list of multiple jurisdictions:

String json = gson.toJson(concept);
Mutation mu = Mutation.newBuilder().setSetJson(ByteString.copyFromUtf8(json.toString())).build();
Assigned mutate = txn.mutate(mu);
txn.commit();

If you watch json variable you can see that you insert something like:
{
“uri”:“http://skos.um.es/unescothes/C00001”,
“term”:“Abandoned children”,
"jurisdiction":[“global1”,“global2”],
“lastUpdate”:“2017-12-27T16:36:02.861”
}

  • Retrieval moment, where I try to get the inserted concept. In this moment I execute a dgraph query to get that concept and return the jurisdiction field. The problem is that jurisdiction field always have only the last jurisdiction as a string instead of a list. This is what I get:

{
“uri”:“http://skos.um.es/unescothes/C00001”,
“term”:“Abandoned children”,
"jurisdiction":“global2”,
“lastUpdate”:“2017-12-27T16:36:02.861”
}

Hope it helps,
Gonçalo.