Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query Flush Mode and Persistence Context

 
Mark Garland
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm (still) reading EJB3 In Action.

Page 353 discusses setting the query flush mode. It describes that AUTO is the default, and COMMIT is undefined. Is then says:
In AUTO mode, when queries are executed within a transaction the persistence provider is responsible for making sure that all entities are updated in the persistence context.


Page 379 is discussing performing Bulk Updates and Deletes, and it says
Vendors are only required to execute the update or delete operations, and not required to modify any changes to the managed entities according the specification.
As an example, they suggest how if you deleted an Entity using the query, the associated entity wouldn't be removed from the persistence context.

Strikes me that these two things are contradicting each other - or is there something that I'm not quite getting here?

Any help appreciated.

Thanks,

MG
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic