session.beginTransaction();
g = (Group) session.createQuery("from Group where id=" + g.getId()).uniqueResult();
g.getArticles().add(article);
article.getGroups().add(g);
session.saveOrUpdate(article);
session.saveOrUpdate(g);
session.getTransaction().commit();
}
public static Group getGroup(String groupname) {
Session session = getSessionFactory().getCurrentSession();