Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

switched from oracle sequence to String @Id and now merge no longer works

 
Johnny SmithyJr
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a basic bean that use to be oracle sequence. I changed it to the code below (with get and set methods) :



now when I call merge it shows the bean updated in logs from merge result, but even after em.flush() and em.getTransaction().commit() the database is not updated, instead i get this log message:


yet if I call this method below it actually updates


Is this expected behavior? can you not call merge when using plain application set @Id, or do I have to change all code to explicit update jpql?
 
Johnny SmithyJr
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from turning on the hibernate jpa logs , there is no update sql generated so it seems to be isolated to hibernate/jpa
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic