Skip to main content
-2 votes
2 answers
90 views

I am trying to keep multiple db calls in multiple classes under same transaction. EX: Parent class (service 1) @Service @Slf4j @RequiredArgsConstructor public class Processor { private final ...
4 votes
1 answer
10k views

I am using Spring boot 2.0.1 with Hikari CP and want to use application properties to set Hikari datasource properties like Connection timeout, Maximum pool size etc but the username and password ...
0 votes
1 answer
97 views

I have a large timeseries collection filled with millions of documents called "Events" that have the following structure { "_id": {"$oid": "123456"}, "...
7 votes
5 answers
17k views

I am trying to achieve below native query logic using hibernate (Spring JPA). But save(Iterable) throws exception and rollback the entire transaction if one of the record fails to persist. Is there ...
1 vote
1 answer
9k views

I'm using Spring Data's MongoTemplate to update multiple documents with a single query. I need to be able to limit the number of documents I update per call. For reasons unclear to me the limit isn't ...
12 votes
3 answers
13k views

I have this situation: Spring Data JPA: Work with Pageable but with a specific set of fields of the entity It about to work with Spring Data and working with a specific set of fields of an @Entity ...
Advice
0 votes
0 replies
28 views

I am trying to implement multi-tenancy in a Spring Boot application using Spring Data Elasticsearch. My goal is: Automatically inject a tenantId filter into all Elasticsearch queries This must apply ...
2 votes
1 answer
126 views

I am using Spring Boot with Hibernate Envers to manage audit tables in a SQL Server database. To optimize performance and handle non-Unicode strings properly, I updated my SQL Server connection string ...
4 votes
2 answers
177 views

Currently spring data has multiple db support (mysql, cassandra, mongo.. very big list), however i want to add my custom repository from the scratch like adding custom db support in spring data. I don'...
0 votes
1 answer
214 views

This is a request for clarification after watching a video about Spring Data JDBC. I have an aggregate made of Book (aggregate root), BookCopy and BookCopyQualityControl. A Book has many BookCopy, and ...
1 vote
2 answers
8k views

Im trying to fetch Distinct records, SQL query looks as follows select DISTINCT id from Table A where UserId = 'XXXX'; Currently, I have implemented this using spring data jpa @Query @Query(value = &...
5 votes
2 answers
9k views

Inside org.springframework.data.jpa.repository.@Query annotation I check if field in a collection and possibly ignore collection if it is empty: @Query(""select e from #{#entityName} where e.type in :...
3 votes
1 answer
1k views

According to the reference, countQuery is required for native queries pagination (at least there is an example with it). But according to my tests (Spring Boot 2.4.5), @Query pagination works without ...
18 votes
1 answer
6k views

I am working on a Spring based project that is (so-far) completely XML-free, except now I've hit a wall with the Spring JPA repository populator: <repository:jackson-populator location="classpath:...
0 votes
0 answers
23 views

We have a very sparse DAG stored in a MySQL 8 table. I want to get all of the nodes leading into (and out of) a given node. The query can be written without too much trouble with the help of this ...

15 30 50 per page
1
2 3 4 5
802