code: public int deleteCascade(Metadata metadata) throws SQLException {
  		int count = 0;
  
  		if (metadata != null) {
  
  			// Delete Metadata References and remove parent references
  			MetadataReferenceDao dao = getMetadataReferenceDao();
  			dao.deleteByMetadata(metadata.getId());
  			dao.removeMetadataParent(metadata.getId());
  
  			// Delete
  			count = delete(metadata);
  		}
  		return count;
  	}
docs: Delete the Metadata, cascading
  
  @param metadata
  metadata
  @return deleted count
  @throws SQLException
  upon failure