• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query Flush Mode and Persistence Context

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You've gotta fight it! Don't give in! Read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic