code: @Override
  	public void remove(ID entityId) {
  
  		T entity = getEntityManager().find(getEntityClass(), entityId);
  
  		// Case of attached entity - simply remove it
  		if (getEntityManager().contains(entity)) {
  			getEntityManager().remove(entity);
  		}
  		// Case of unattached entity, first it is necessary to perform
  		// a merge, before doing the remove
  		else {
  			entity = getEntityManager().merge(entity);
  			getEntityManager().remove(entity);
  		}
  	}
docs: {@inheritDoc}