This question is in context with the problem mentioned in this thread. I'm also facing the same problem while using JPA on MySQL. I could resolve it only when I changed the generation strategy to TABLE.
But the question is, what was the reason behind this problem and why changing the strategy to TABLE is the solution (this remains unanswered in the thread) ?