Your userAccount is managed since you get it from the DB. Your SocialAccount, however, is not. If a SocialAccount with this id is already in the DB, it will throw this exception. Fix it by calling merge() instead of saveOrUpdate().
Oracle Certified Professional: Java SE 6 Programmer
Oracle Certified Expert: Java EE 6 Web Component Developer
Oracle Certified Expert: Java EE 6 Enterprise JavaBeans Developer
Joined: Jul 08, 2010
Thank you for the advise and yes merge works. I now underatand that the mege will update the managed object from the unmanged object.