code: @Override
      public void persistJoinTable(JoinTableData joinTableData)
      {
          String joinTableName = joinTableData.getJoinTableName();
          String joinColumnName = joinTableData.getJoinColumnName();
          String invJoinColumnName = joinTableData.getInverseJoinColumnName();
          Map<Object, Set<Object>> joinTableRecords = joinTableData.getJoinTableRecords();
  
          for (Object key : joinTableRecords.keySet())
          {
              Set<Object> values = joinTableRecords.get(key);
              Object joinColumnValue = key;
  
              for (Object childId : values)
              {
                  Map<String, Object> obj = new HashMap<String, Object>();
                  String id = joinTableName + "#" + joinColumnValue.toString() + "#" + childId;
                  obj.put("_id", id);
                  obj.put(joinColumnName, joinColumnValue);
                  obj.put(invJoinColumnName, childId);
                  JsonObject object = gson.toJsonTree(obj).getAsJsonObject();
                  HttpResponse response = null;
                  try
                  {
                      URI uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(),
                              CouchDBConstants.URL_SEPARATOR + joinTableData.getSchemaName().toLowerCase()
                                      + CouchDBConstants.URL_SEPARATOR + id, null, null);
  
                      HttpPut put = new HttpPut(uri);
                      StringEntity stringEntity = null;
                      stringEntity = new StringEntity(object.toString(), Constants.CHARSET_UTF8);
                      stringEntity.setContentType("application/json");
                      put.setEntity(stringEntity);
  
                      response = httpClient.execute(httpHost, put, CouchDBUtils.getContext(httpHost));
                  }
                  catch (Exception e)
                  {
                      log.error("Error while persisting joinTable data, coused by {}.", e);
                      throw new KunderaException(e);
                  }
                  finally
                  {
                      closeContent(response);
                  }
              }
          }
      }
docs: /*
  (non-Javadoc)
  
  @see
  com.impetus.kundera.client.Client#persistJoinTable(com.impetus.kundera
  .persistence.context.jointable.JoinTableData)