public void deleteComment(long taskId, long commentId) { Task task = em.find(Task.class, taskId); Comment comment = em.find(Comment.class, commentId); task.getTaskData().removeComment(commentId); em.remove(comment); }
public void deleteComment(long taskId, long commentId) { Task task = em.find(Task.class, taskId); Comment comment = em.find(Comment.class, commentId); task.getTaskData().removeComment(commentId); em.remove(comment); }