私はCloudantClient 2.11を使用しています。私は複雑なキーでビューを作成しました。 クライアントAPIを使用してビューを照会しようとしています。私はそれぞれの行結果がキーと返された値の両方を持っているのを見ることができますが、row.getKey()はnullを返します。クエリCloudantClient with ComplexKeyはnullキーを返します
my database view and documents
私のコードは次のようになります。
ViewResponse<ComplexKey, Integer> response = database.getViewRequestBuilder("view", "viewName").newRequest(Key.Type.COMPLEX, Integer.class).reduce(true)
.group(true).build().getResponse();
List<Row<ComplexKey, Integer>> rows = response.getRows();
for (Row<ComplexKey, Integer> row : rows) {
ComplexKey key = row.getKey();
Integer value = row.getValue();
}
問題がrow.getKey(ある)私はそれがキー値を持って見ることができますが、すべての方法nullです。
ヘルプ
アッシいただきありがとうございます。
配列キーがオブジェクトより優先される理由については、[この問題のコメント](https://github.com/cloudant/java-cloudant/issues/386#issuecomment-340009841)を参照してください。 – ricellis