You are currently browsing legacy 3.5 version of documentation. Click here to switch to the newest 5.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Conventions related to request handling


Instruct the client to do parallel MultiGet processing when handling lazy requests. It is enabled by default.



The function that begins the handling of forbidden responses.

conventions.setHandleForbiddenResponse(new HttpResponseHandler() {
  public Action1<HttpRequest> handle(HttpResponse httpResponse) {
    return null;


It handles of unauthenticated responses, usually by authenticating against the oauth server.

conventions.setHandleUnauthorizedResponse(new HttpResponseWithMetaHandler() {
  public Action1<HttpRequest> handle(HttpResponse httpResponse, OperationCredentials credentials) {
    return null;


The default JsonContractResolver used by RavenDB will serialize all properties and all public fields. You can change it by providing own implementation of DeserializationProblemHandler class:

conventions.setJsonContractResolver(new CustomJsonContractResolver());

public static class CustomJsonContractResolver extends DeserializationProblemHandler
  public boolean handleUnknownProperty(DeserializationContext ctxt, JsonDeserializer<?> deserializer,
    Object beanOrClass, String propertyName) throws IOException, JsonProcessingException {
    return super.handleUnknownProperty(ctxt, deserializer, beanOrClass, propertyName);



Controls whatever properties that were not de-serialized to an object properties will be preserved during saving a document again. If false, those properties will be removed when the document will be saved. Default: true.