SyntaxFix
Write A Post
Hire A Developer
Questions
I got the answer, I was using:
em.persist(user);
I used merge in place of persist:
em.merge(user);
But no idea, why persist didn't work. :(