(I'm using glassfish + toplink + mysql)
I think that I found a bug in a toplink library.
In order to reproduce the bug follow these steps:
Make a table into db TAB:(INT id, VARCHAR content)
Make an ejb module with Entity for TAB row.
Make a facade in order to manage the Entities.
Make a local interface for test method.
Into test method create new Entity(1,new Date().toString()).
call entity manager merge for the entity created.
Call the test method: The data is inserted into db.
ReCall the test method: The data is updated into db.
Delete manually by using mysql client the row with id = 1.
ReCall the test method: [b]data is not updated, the row is not inserted[/b]
Re try this with Hibernate and works also the last step.
So I think that there is a bug in Toplink.
[Message sent by forum member 'peppeme' (peppeme)]
http://forums.java.net/jive/thread.jspa?messageID=266769