Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • 7
    It's important to understand that once an Entity is loaded into a persistence context it is managed, and will not be reloaded from the database unless you call refresh() (calling find() will just return the already loaded version). Update queries will only update the database, not any entities already managed, whereas delete() queries will update the persistence context, so a call to find() will not return an entity which was deleted with a query.. Commented Mar 18, 2017 at 11:53