DATACOUCH-154 - Guess design doc as uncapitalized class name.
In the SimpleCouchbaseRepository the guessed design document was lowercase of the entity class, whereas in ViewBasedCouchbaseQuery it is uncapitalized (only first letter is lowercase). This has been made consistent, using the uncapitalize method. The doc now reflects that and explicitly have examples with camel case classes (UserInfo instead of User).
This commit is contained in:
@@ -30,6 +30,7 @@ import org.springframework.data.couchbase.core.view.View;
|
||||
import org.springframework.data.couchbase.repository.CouchbaseRepository;
|
||||
import org.springframework.data.couchbase.repository.query.CouchbaseEntityInformation;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Repository base implementation for Couchbase.
|
||||
@@ -205,7 +206,7 @@ public class SimpleCouchbaseRepository<T, ID extends Serializable> implements Co
|
||||
* @return ResolvedView containing the designDocument and viewName.
|
||||
*/
|
||||
private ResolvedView determineView() {
|
||||
String designDocument = entityInformation.getJavaType().getSimpleName().toLowerCase();
|
||||
String designDocument = StringUtils.uncapitalize(entityInformation.getJavaType().getSimpleName());
|
||||
String viewName = "all";
|
||||
|
||||
final View view = viewMetadataProvider.getView();
|
||||
|
||||
Reference in New Issue
Block a user