Ok I am using the couchbase client in a couchbase bucket.
I have a pojo that is serializable. Everything is working fine, the document is stored but not where I thought it would.
client is initialized to localhost default bucket.
String idStr = "RuleDefinition_" + doc_RuleDefinition.getId().toString();
client.set(idStr, gson.toJson(doc_RuleDefinition, DOC_RuleDefinition.class)).get();
When I look in the Couchbase view
function (doc, meta) {
emit(doc.eventKey, null);
}
I see my documents in json but the key is NOT "RuleDefinition_41" as I expected with the id of 41 in the RuleDefinition pojo.
I have other pojos I want to store, and they may have an id value of 41, so I would like to store “HandlerMap_41”, and “HandlerJar_41” but if the key gets stripped to just 41, then won’t the second two overwrite the first?