users@glassfish.java.net

Re: JPA - entityManager.flush()

From: <glassfish_at_javadesktop.org>
Date: Tue, 15 May 2007 13:25:05 PDT

Yes, I know,
I added em.merge because I was clueless,

With/without the merge I still gets the modifications in DB when the transaction ends,

But it ends when the method ends, and this is not so good for me,

Well, anyway, em.flush() should flash the changes into the DB when it is invoked, according to the specs (at least from my understanding),

And toplink doesn't do anything, it writes the changes -ONLY- when the method finish to be invoked.

I am pretty sure, since after calling flush() I have tons of code that takes a while to finish. I monitored the DB and could see that nothing happen when flush() invoked over the injected entityManager.


I assume this is a bug...

Thanks.
[Message sent by forum member 'trouby' (trouby)]

http://forums.java.net/jive/thread.jspa?messageID=217135