code: @Deprecated
      <T> T fromDBObject(final Datastore datastore, final DBObject dbObject) {
          if (dbObject.containsField(opts.getDiscriminatorField())) {
              T entity = opts.getObjectFactory().createInstance(null, dbObject);
              entity = fromDb(datastore, dbObject, entity, createEntityCache());
  
              return entity;
          } else {
              throw new MappingException(format("The DBObject does not contain a %s key.  Determining entity type is impossible.",
                  opts.getDiscriminatorField()));
          }
      }
docs: Converts an entity (POJO) to a DBObject.  A special field will be added to keep track of the class type.
  
  @param datastore the Datastore to use when fetching this reference
  @param dbObject  the DBObject
  @param <T>       the type of the referenced entity
  @return the entity
  @morphia.internal
  @deprecated no replacement is planned