code: @Override
      public void delete(Object entity, Object pKey)
      {
          EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entity.getClass());
          MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                  entityMetadata.getPersistenceUnit());
          AbstractManagedType managedType = (AbstractManagedType) metaModel.entity(entityMetadata.getEntityClazz());
  
          DBObject query = new BasicDBObject();
  
          if (managedType.hasLobAttribute())
          {
              KunderaGridFS gfs = new KunderaGridFS(mongoDb, entityMetadata.getTableName());
              String id = ((AbstractAttribute) entityMetadata.getIdAttribute()).getJPAColumnName();
              query.put("metadata." + id, pKey);
              gfs.remove(query);
          }
  
          else
          {
              if (metaModel.isEmbeddable(entityMetadata.getIdAttribute().getBindableJavaType()))
              {
                  MongoDBUtils.populateCompoundKey(query, entityMetadata, metaModel, pKey);
              }
              else
              {
                  query.put("_id", MongoDBUtils.populateValue(pKey, pKey.getClass()));
              }
              // For secondary tables.
              List<String> secondaryTables = ((DefaultEntityAnnotationProcessor) managedType.getEntityAnnotation())
                      .getSecondaryTablesName();
              secondaryTables.add(entityMetadata.getTableName());
  
              for (String collectionName : secondaryTables)
              {
                  KunderaCoreUtils.printQuery("Drop existing collection:" + query, showQuery);
                  DBCollection dbCollection = mongoDb.getCollection(collectionName);
                  dbCollection.remove(query, getWriteConcern(), encoder);
              }
  
              getIndexManager().remove(entityMetadata, entity, pKey);
          }
      }
docs: /*
  (non-Javadoc) object
  
  @see com.impetus.kundera.client.Client#delete(java.lang.Object,
  java.lang.Object)