*
The moose likes Object Relational Mapping and the fly likes switched from oracle sequence to String @Id and now merge no longer works Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "switched from oracle sequence to String @Id and now merge no longer works" Watch "switched from oracle sequence to String @Id and now merge no longer works" New topic
Author

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

Johnny SmithyJr
Greenhorn

Joined: Mar 03, 2010
Posts: 7
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

Joined: Mar 03, 2010
Posts: 7
from turning on the hibernate jpa logs , there is no update sql generated so it seems to be isolated to hibernate/jpa
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: switched from oracle sequence to String @Id and now merge no longer works
 
Similar Threads
Double Insert Oracle 11g / JPA / Swing
How to call valuechangelistener before form is submitted (on save)
Hibernate-Oracle Sequence...
Getting lock on DB from two different JVM
EJB 3 IN ACTION - EntityManager merge() and refresh() method conflict