Hi,
In case if you are still looking for the answer, found the following info
Just like persist, invoking remove on an entity does NOT cause an immediate SQL DELETE to be issued on the database. The entity will be deleted on the next invocation of EntityManager#flush() that involves that entity. This means that entities scheduled for removal can still be queried for and appear in query and collection results.
at
webpage
So, if explicit flush call is not invoked, the SQL queries will get queued up to be executed in bulk during the default flush that happens at the transaction commit time. And, there seems to be an order in which the SQL queries are fired on the database(atleast in case of hibernate.. more info at
webpage.
Here, entity removal is executed last. The same might be happening in your scenario with TopLink as well.