23,353 questions
-2
votes
0
answers
10
views
EOFException when updating StepExecution tables [closed]
Spring Batch + YugabyteDB + HikariCP — EOFException when updating
STEP_EXECUTION_CONTEXT after long-running batch
Environment
Spring Boot: 3.5.4
Spring Batch: Partitioned job with multiple threads
...
0
votes
1
answer
77
views
Sort query parameter has no effect when JSON property naming strategy is UpperCamelCase
I use Spring Data REST to expose CRUD endpoints for a JpaRepository. The endpoint on the collection resource provides page, size and sort query parameters. The issue is that sorting doesn't work for ...
0
votes
0
answers
86
views
How to find fragment interface generic type
I am trying to create a custom generic repository using the fragment interface approach as described in this article: https://docs.spring.io/spring-data/jpa/reference/repositories/custom-...
0
votes
1
answer
89
views
How to optimize a complex insurance quotation workflow with multiple dependent validations and API/database calls?
I’m working on enhancing a life insurance quotation workflow using Spring Boot 3 with JPA/Hibernate.
The workflow involves several dependent steps:
Customer eligibility checks
Product → Plan → Rider ...
1
vote
1
answer
99
views
Hibernate: How to keep PostgreSQL enum type up-to-date with Java enum?
I'm building a Spring server program which uses a PostgreSQL database. For one of the table columns, I want to restrict the possible values to a static pre-defined set, so I created a PostgreSQL enum ...
1
vote
1
answer
114
views
is @Transactional(isolation = Isolation.REPEATABLE_READ) enough for safe incrementing?
Is it possible to lost increment here? If not, is it possible in case of read_commited level?
@Transactional
public updateProductStatistics(Long productId) {
ProductStats stats = ...
1
vote
1
answer
85
views
Migration files not executed in test
I have test class which, if configured in this way, works
@DataJpaTest
@AutoConfigureEmbeddedDatabase(
refresh = AutoConfigureEmbeddedDatabase.RefreshMode.BEFORE_EACH_TEST_METHOD,
provider = ...
0
votes
0
answers
64
views
Hibernate doesn't load attribute nodes with entity graph
I have the next entity three:
TestEntity
/ \
FirstNodeEntity SecondNodeEntity
(LIST, LAZY) (LIST, LAZY)
| \
ThirdNodeEntity ...
-2
votes
0
answers
71
views
How to overrides Entity field in tests with Spring boot v4 + Hibernate [closed]
I wanna test a PostEntity without removing the next code:
@CreatedBy // Have to remove these ", nullable = false, insertable = false, updatable = false"
@Column(name = "created_by")...
-1
votes
0
answers
81
views
Spring Boot 4.0.0 breaks spring-data-rest-hateos Post Request with relationships
I've migrated my Spring Boot 3.5.8 application that uses spring-data-rest (@RepositoryRestResource). I used to be able to create (Post Request) entities and assign the entity to its relationship with ...
1
vote
1
answer
137
views
Spring Boot (4.0.0) Cannot Connect to MongoDB in Docker Compose Network
I'm trying to connect my Spring Boot application (using spring-boot-starter-data-mongodb) to a MongoDB instance within a shared Docker network managed by docker-compose.
The connection is failing, and ...
1
vote
1
answer
68
views
Customize spring data jpa repository's query to avoid fetch eager fields
Let's say I have a spring-boot-based project, that uses spring data jpa to define entities and map them to a postgres db.
The entity has some @ManyToOne annotatated "joins" - with eager ...
0
votes
1
answer
56
views
Spring native query (declare..begin..end) with parameters
I have trouble passing parameters for a native query with declare..begin..end style.
This code doesn't work:
@Test
@Transactional
void foo() {
em.createNativeQuery("""
do
...
0
votes
0
answers
70
views
Spring Boot 2.7.x JPA @ManyToOne join returns empty list on GET, but works on POST
In a Spring Boot 2.7.x application with Hibernate/JPA, there are two tables:
tickets
complaint_id (PK, VARCHAR(255))
attachment
complaint_id (FK, VARCHAR(255))
other fields: id, file_name, ...
-1
votes
0
answers
34
views
cant manage to make entity corresponding to entitygraph query
so i am using entity graph to make a dynamic query of a table, the query is being made correctly which is corresponding to my graph and subgraph attribute nodes but when i fetch it as the entity, the ...