Skip to content

danielberecz/couchbase-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Views

As a rule of thumb, all repository access methods which are not "by a specific key" require a backing view to find the one or more matching entities.

The views for this sample to work:

  1. For query by first name
function (doc, meta) {
  if (doc._class == "com.couchbase.sample.dto.User" && doc.lastName) {
    emit(doc.lastName, null);
  }
}
  1. For query all documents
function (doc, meta) {
  if (doc._class == "com.couchbase.sample.dto.User") {
    emit(null, null);
  }
}

More info on Spring Data Couchbase

##Sample payload

{
  "id":"nickel_back",
  "firstName":"Nickel",
  "lastName":"Back",
  "email":"a@b.com"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages