379 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
49
views
Spring Data JDBC inserts varchar into Postgres jsonb column even with custom PGobject converter
I’m trying to persist a JSON object into a PostgreSQL jsonb column using Spring Data JDBC (not JPA).
Even with a custom @WritingConverter that returns a PGobject of type jsonb, PostgreSQL errors out ...
0
votes
0
answers
45
views
PostgreSQL "created_at" null constraint violation when using @ManyToMany in Spring Data JPA
I have the following entity setup in Spring Boot with Spring Data JPA:
@Entity
public class Role extends BaseEntity {
@ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, ...
0
votes
0
answers
123
views
Spring Data JDBC - mapping a series of nested one-to-many relationships inside an aggregate
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 ...
2
votes
1
answer
36
views
How to manage DB dialect in spring data jdbc named queries?
With Spring Data JDBC, named queries can be written in META-INF/jdbc-named-queries.properties.
Does Spring Data provide a mechanism to have multiple files? Ideally one for each SQL dialect, jdbc-named-...
0
votes
1
answer
72
views
Spring Data implementing custom repository with abstract class in the middle
I need to implement filtering to all entities' repositories.
The filtering follows the same scenario, differing only in Filter and Entity params.
So now I have my filter interface:
interface ...
1
vote
1
answer
111
views
My Custom Repository returns a vavr Try. Why does Spring Data jdbc wrap it in another vavr.Try?
I'm using spring boot 3.4.3.
I am trying to figure out best practices on how to use Spring, and I want to be able to return errors as types instead of throwing exceptions. That is my premise. If it ...
0
votes
0
answers
46
views
Using `JdbcTemplate` with `@Table` Entities in Spring Data JDBC Without a Custom `RowMapper`
I use spring-data-jdbc and have mapped my DB tables with org.springframework.data.relational.core.mapping.Table.
I also have some custom queries with org.springframework.data.jdbc.repository.query....
2
votes
0
answers
94
views
Force JOIN query for Spring Data JDBC
Is there any way or some kind of extension which will generate JOIN query for default Spring Data JDBC repositories?
For example:
public class Root {
private @Id Long id;
private String name;
...
1
vote
1
answer
67
views
Spring Data JDBC repository-like service without extending Repository<Entity, Id>
I am using Spring Data JDBC repositories which are defined through interfaces (which extend Repository<Entity, Id> and have their queries specified through @Query) for various entities and ...
0
votes
1
answer
47
views
What does "hit type limits" mean in the Spring Data Relational documentation?
I’m working with Spring Data repositories and came across the following statement in the documentation:
Following that path can easily lead to confusion and is discouraged as you will quickly hit ...
1
vote
1
answer
68
views
Reference joined entity within Query Criteria
Using Spring Data Relational (Spring Data JDBC V3.3.6), I have an entity setup similar to the following:
@Table("entity_a")
public record EntityA(
@Id
Long id,
@Column("...
1
vote
1
answer
55
views
Spring Data JDBC dynamic projection: always populates "full" DTO
I'm implementing a REST service on top of a complex data model using Spring Data JDBC, and I'm hitting the N + 1 problem, where I'm seeing multiple extra queries per record returned. I'm on 3.3.7 and ...
1
vote
1
answer
76
views
Upgrading Spring Data JDBC from 3.1.1 to 3.3.0, got "idValue must not be null at this point" on query
I'm encountering a regression on moving from Spring Data JDBC 3.1.1 to 3.3.0, and I'm wondering if it sounds familiar to any experts.
UPDATE: I realized that there wasn't enough information on this ...
0
votes
0
answers
73
views
Store Java Object as JSON in DB Table in Spring Data JDBC and Search with Stored JSON Properties Soon
i'm using spring-data-jdbc and i want to store java object as a json into database and when i find or search in the repository i use normal _ as we do in normal spring-data-jdbc nested object as an ...
0
votes
1
answer
161
views
Cannot invoke org.springframework.data.relational.core.mapping.RelationalPersistentEntity.getPropertyAccessor(Object)
I keep getting this exception when persisting/inserting a new entity using Spring Data JDBC. What is wrong with my entity?
I already have the version field without final in the audit metadata.
I ...