@Transactional
	public void save(Attack attack) {
		Attack merged = em.merge(attack);
		em.flush();
		attack.setId(merged.getId());
	}
@ Transactional public void save ( Attack attack ) { Attack merged = em . merge ( attack ) ; em . flush ( ) ; attack . setId ( merged . getId ( ) ) ; }
Save {@link Attack} to DB

@param attack {@link Attack} to save