Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7585723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:14:37+00:00 2026-05-30T19:14:37+00:00

I am using OpenJPA. If I want to do a mass delete/update using the

  • 0

I am using OpenJPA. If I want to do a mass delete/update using the executeUpdate() method, will the JPA cache be updated? Or will this bypass the JPA cache? When I say “cache”, I am talking about both the L1 and L2 caches. Does the type of query matter (native vs. JPQL)? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:14:38+00:00Added an answer on May 30, 2026 at 7:14 pm

    The documentation says:

    The persistence context is not synchronized with the result of the
    bulk update or delete.

    Caution should be used when executing bulk update or delete operations
    because they may result in inconsistencies between the database and
    the entities in the active persistence context. In general, bulk
    update and delete operations should only be performed within a
    transaction in a new persistence context or at the beginning of a
    transaction (before entities have been accessed whose state might be
    affected by such operations).

    So, since OpenJPA doesn’t synchronize the L1 cache, I don’t see why it would (and how it could) synchronize the L2 cache. He could flush it, but I doubt it. It’s easy enough to test anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using JPA with openjpa implementation beneath, on a Geronimo application server. I
Is there any jpa 1.0 fluent api/interface for query building? I'm using openjpa 1.x,
I am using JPA in my WAS 6.1. I try to execute this line:
I am using OpenJPA 2.1 (which implements JPA 2.0 ) for a command line
I am using openjpa runtime of JPA specification. At development time I am using
I'm using OpenJPA and want to configure it to use Autocommit on every write/insert
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm having trouble handling IDs of my databse tables using OpenJPA and HSQLdb. I
I have an existing data model using openJPA and I am trying to integrate
I am trying to compile the canonical metamodel classes for some JPA entities using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.