spring-repositories Questions
1
Task :app:checkDebugAarMetadata FAILED
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.exam...
Viceregent asked 14/6, 2021 at 6:44
9
Solved
I am working with spring boot tutorial from javabrains and everything was clear until putting CrudRepository inside project. Below you can find my main class:
package pl.springBootStarter.app;
im...
Pomfret asked 1/5, 2019 at 8:57
4
Solved
How do I do a distinct counting with Spring Data JPA? I do not want to use the @Query annotation. The equivalent sql query would be:
SELECT COUNT(DISTINCT rack) FROM store WHERE id = 10001;
I t...
Gregor asked 4/6, 2018 at 11:0
1
Solved
I'm using the Spring-data-mongodb repository framework in my Spring Boot project. I have an API where users can specify 1+ query parameters when searching for an object, and I would like to convert...
Gog asked 24/11, 2023 at 16:24
3
Solved
I've got to do upserts of thousands of records at a time, broken into batches of let's say 25 actual upserts at a time. The upsert is based on a unique constraint being service+key, and if the inse...
Pusher asked 15/9, 2023 at 14:59
9
Solved
What is the difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?
When I see the examples on the web, I see them there used kind of interchangeably.
What is the differ...
Satterwhite asked 23/12, 2012 at 19:35
5
Solved
I have this model:
public class Event {
private String name;
private Date start;
private Date end;
}
and repository as
@Repository
public interface EventRepository extends JpaRepository<Even...
Backbencher asked 30/9, 2016 at 5:33
2
Solved
I would like to know if it is possible to call a stored procedure without having to bind it to a Table/Model?
In my case I have a stored procedure in the database that sends a mail. I would like t...
Simony asked 30/1, 2018 at 14:47
2
I've two entities, a user and a registered user.
A registered user has a field of type user. I would like to have a method in the spring data repository related to this registered user entity to ...
Correspondent asked 12/5, 2016 at 17:37
2
Solved
I have configured Spring Data JPA with Redis and using RedisRepositories with provides methods like find(), findAll() etc. All these methods seem to be working just fine, but I am not able to write...
Ojibwa asked 29/6, 2018 at 12:31
3
Solved
I have entity like this:
@Getter
@Setter
@Entity
public class Conversation extends AbstractEntity{
@ElementCollection
@Column(name = "user_id", nullable = false)
@CollectionTable(name...
Scotney asked 20/6, 2020 at 15:53
3
I search for a way to get a list of Objects created on a certain LocalDateTime date saved in the Postgresql database in a field of type TIMESTAMPTZ.
To do so, I tried to use JpaRepository:
List&l...
Caprifoliaceous asked 25/5, 2020 at 7:21
4
Solved
I've got a class which contains an atttribute of java.time.LocalDateTime type.
public class MyClass{
// ...
private LocalDateTime fecha;
// ...
}
I'm using Spring Data repositories. What I wa...
Consolation asked 15/5, 2017 at 10:58
3
When reading about creating custom queries in Spring, I noticed that none of the classes (UserRepositoryCustom, UserRepositoryCustomImpl, UserRepository) use the @Repository annotation.
I was surp...
Walloper asked 17/4, 2019 at 13:26
1
Solved
So I'd like a "Void-Repository" through which to gain access to stored procedures that are not necessarily operation on entities.
@Repository
public interface StoredProceduresRepository extends Cr...
Future asked 16/12, 2019 at 12:59
1
Solved
We try to use the Spring Data CrudRepository in our project to provide persistency for our domain objects.
For a start I chose REDIS as backend since in a first experiment with a CrudRepository<...
Wembley asked 29/10, 2019 at 11:27
2
Solved
I have a lot of JPA entities automatically created from a relational database schema.
Is there any way to generate also there corresponding Spring Data Repositories (Repository interfaces)?
Passageway asked 21/12, 2016 at 8:1
1
Solved
My @RestController
@GetMapping("/projects/{project_id}")
public Project getProjectById(@PathVariable(value = "project_id") UUID projectId) {
return projectRepository.findById(projectId).orElseThr...
Arian asked 17/5, 2019 at 6:35
4
Solved
I want to get all the results in single page, I've tried with
Pageable p = new PageRequest(1, Integer.MAX_VALUE);
return customerRepository.findAll(p);
Above is not working, is there any methods...
Occidental asked 5/2, 2017 at 15:29
3
Solved
So i am using Spring to access my DB and fetch Users based on different Properties. With a @Restcontroller I get the Data. I created a UserRepository which extends the CrudRepository.
import org.s...
Stoker asked 23/11, 2018 at 19:8
1
Solved
In a SpringBoot Microservice, I am trying to select the latest record for an actor for each mean_of_payment_id. To achieve this, selecting actor content for actor_id where created_date is equaled t...
Fabria asked 10/10, 2018 at 16:4
2
Solved
I have an existing spring 4 project (mvc, jdbc etc) and I tried to port it to spring boot and I can't. (many dependencies troubles, no one can't explain how I can do that). But now I just want to u...
Totalitarianism asked 20/8, 2018 at 13:24
1
Solved
I implement pagination like this:
List<Products> products = productRepository.findAllProducts(productsRequest.getInitiatorType(), "ACTIVE",
new PageRequest(page, 100, Sort.Direction.DESC, "...
Fard asked 30/1, 2018 at 7:58
1
I have in a Spring Repo something like this:
findTop10ItemsByCategIdInOrderByInsertDateDesc(List ids)
I want the first 10 items where category id in list of ids ordered by insert date.
Another ...
Karisakarissa asked 2/9, 2015 at 11:33
1
Solved
I want to define two @NamedNativequery on entity class . When tying to define eclipse gives a error.
Duplicate annotation of non-repeatable type @NamedNativeQuery. Only
annotation types marked ...
Pelias asked 1/8, 2016 at 16:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.