On Using Spring JDBC which works very well and has some improvements over JPA when using Batch processing.
I would love to learn why to use Spring Data JDBC when you already have Spring JDBC.
I would love to learn why to use R2DBC when you already…
In my project, I use spring-data-jdbc version 2.0.4.RELEASE and I'm stuck with the problem of how to specify a schema for a table. The entity class looks like this
@Data
@Table(value = "alpha.op_organization")
public class OrganizationEntity {
…
I'm trying to use the following with spring-data-jdbc and postgres driver (kotlin),
data class MyEntity(
val id: UUID,
val content: String
)
using a string fails with the following error,
org.postgresql.util.PSQLException: ERROR: column…
I would like to understand why is spring-data-jdbc providing integration to MyBatis.
What problem is it solving?
How is spring-data-jdbc complimenting MyBatis.
Is it just a question of conforming the Mapper to Repository or it goes beyond that.…
I want to model a OneToMany Relation with Spring Data JDBC. I´ve read on this very useful blog https://spring.io/blog/2018/09/24/spring-data-jdbc-references-and-aggregates that you should use references when you want to model ToMany Reference: …
All the CRUD methods related to the CrudRepository are working as intended but when trying to use the findAll with paging or sorting an error is thrown. I am using the Lovelace-SR2 release train. The class only has one field which is the @Id.…
I am exploring possible ideas when it comes to designing the one-to-one and one-to-many relationships while using Spring Data R2DBC.
As Spring Data R2DBC still do not support relationships natively there is still a need to handle those on our own…
I have the following test table:
CREATE TABLE user (
id UUID NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
name VARCHAR(100),
address jsonb
)
What I want to do is loading this table into an entity
public class Buddy{
@Id
private UUID…
since i can't find anything in the docs and the information out there seems to be restricted - what is the best way to achieve functionality equal to the Criteria API from spring data in Spring Data JDBC?
Is there any alternative or do i have to…
I would like to use PagingAndSortingRepository with spring-data-jdbc but it not seem to work. It's only available with JPA ?
I tried to use PagingAndSortingRepository and use the findAll(Pageable pageable).
But I actually get a "No query specified…
I use Spring-Data-JDBC (not JPA) and want to set the fetch-size.
I know that the the classic org.springframwork.jdbc.core.JdbcTemplate has a setFetchSize(int) method, but I have Spring-Data-JDBC…
I'm trying to create an API to retrieve records from a database with Spring Boot Data JDBC.
Say I have the following entity:
record Customer(@Id Long id, String name) {}
and the following repository:
public interface CustomerRepository extends…
I created a query method using a Reference from another Aggregate.
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE, onConstructor_=@PersistenceConstructor)
public static class Book {
public static Book of(Author author) {
…
I try declare and use deleteBy method with spring-data-jdbc repositories like this
public interface TokenRepository extends CrudRepository {
void deleteByBreed(Long breed);
}
When i tried to call method
private TokenRepository…
When I run this query, I experience n+1 issue where data JDBC fetches all the related entities of the campaign objects. Is there any way to avoid this using data JDBC?
@Query(
"""
SELECT campaign.*
FROM campaign
JOIN targeting ON…