public void create(Article article) throws RollbackFailureException, Exception {
        if (article.getCommentList() == null) {
            article.setCommentList(new ArrayList<Comment>());
        }
        EntityManager em = null;
        try {
            utx.begin();
            em = getEntityManager();
            User authorID = article.getAuthorID();
            if (authorID != null) {
                authorID = em.getReference(authorID.getClass(), authorID.getUserID());
                article.setAuthorID(authorID);
            }
            List<Comment> attachedCommentList = new ArrayList<Comment>();
            for (Comment commentListCommentToAttach : article.getCommentList()) {
                commentListCommentToAttach = em.getReference(commentListCommentToAttach.getClass(), commentListCommentToAttach.getCommentID());
                attachedCommentList.add(commentListCommentToAttach);
            }
            article.setCommentList(attachedCommentList);
            em.persist(article);
            if (authorID != null) {
                authorID.getArticleList().add(article);
                authorID = em.merge(authorID);
            }
            for (Comment commentListComment : article.getCommentList()) {
                Article oldNewsIDOfCommentListComment = commentListComment.getNewsID();
                commentListComment.setNewsID(article);
                commentListComment = em.merge(commentListComment);
                if (oldNewsIDOfCommentListComment != null) {
                    oldNewsIDOfCommentListComment.getCommentList().remove(commentListComment);
                    oldNewsIDOfCommentListComment = em.merge(oldNewsIDOfCommentListComment);
                }
            }
            utx.commit();
        } catch (Exception ex) {
            try {
                utx.rollback();
            } catch (Exception re) {
                throw new RollbackFailureException("An error occurred attempting to roll back the transaction.", re);
            }
            throw ex;
        } finally {
            if (em != null) {
                em.close();
            }
        }
    }