Quote:
...so I do a check first to see if the Tag exists and if it does exist I get its ID and set it on the Tag nested in the TaggedArticle...
I guess this is the problem. You are not allowed to have two different Tag objects with the same ID. Since you did a check this probably means that Hibernate has already loaded a Tag object with the specific id already. What you need to do is to change the Tag object that the TaggedArticle references to the already existing Tag object. Eg something like:
Code:
TaggedArticle article = ...
Tag existing = (Tag)session.get(Tag.class, tagId);
article.setTag(existing);