Comments (2)
Thanks for getting in touch. We prefer to use GitHub issues only for bugs and enhancements. The question on SO seems to have been answered already.
from spring-data-jpa.
Actually it is a bug in the Sppring Data JPA Repository. Because entityManager.flush() must be called implicitally by a vendor if FlushModeType.AUTO is used, see related JEE API Doc:
https://docs.oracle.com/javaee%2F7%2Fapi%2F%2F/javax/persistence/FlushModeType.html
"... the persistence provider is responsible for ensuring that all updates to the state of all entities in the persistence context which could potentially affect the result of the query are visible to the processing of the query. ..."
In case of a Spring-Data JPA Repository methods annotated with @query, the entityManager.flush() will be called implicitally before executing the query, so the query can use/see the changes made in the same transaction.
In case of a Spring-Data JPA Repository methods annotated with @procedure the entityManager.flush() will not be called implicitally, so the stored procedure, in which queries may be used, will not use/see changes made in the same transaction.
We use Spring-Boot 2.7.10
from spring-data-jpa.
Related Issues (20)
- Spring Data JPA Query with Class Constructor: org.hibernate.query.SemanticException: Cannot compare ... HOT 4
- Using native Hibernate multitenancy with Spring Data JPA breaks on application boot. HOT 7
- JpaSpecificationExecutor distinct find by with limit HOT 4
- Spring Data JPA generates incorrect JPQL query for sorted pagination request with UNION clause HOT 1
- Column "X" must appear in the GROUP BY clause or be used in an aggregate function HOT 3
- Unable to determine SQL type name for column 'option_type' of table 'account_options' because there is no type mapping for org.hibernate.type.SqlTypes code: 2000 (JAVA_OBJECT) HOT 1
- Bug: Missing implicite entityManager.flush() before storedprocedure call and Spring-Data Repository HOT 3
- Error executing DDL HOT 3
- After upgrade to 3.2.4, when use @Query to query native sql will bootstrap fail, as the jsqlparser version too lower. Below is the error message. HOT 1
- Upgrade to Hibernate 6.5.0
- Upgrade to JSqlParser 4.9
- SimpleJpaRepository.delete(Specification<T> spec) throws NullPointerException [Kotlin] HOT 3
- Align EnableJpaRepositories with changes in data-commons.
- Native query is not working when an entity attribute entity attribute is annotated with @NotFound HOT 2
- Ordering JPA statement with SUM function HOT 1
- Upgrade to Hibernate 6.4.6.Final
- hibernate6.5 fix @Query doesn't check constructor field type issue HOT 1
- JPQL and HQL parser issue with class projection when FQDN includes "exp" HOT 1
- `HqlParserUnitTests` is flaky
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-data-jpa.