12,018 questions
Best practices
0
votes
0
replies
64
views
Spring Boot Data starter autoconfiguration behaviour when a configuration is missing, default localhost or error?
I am currently trying to build a Spring Boot autoconfiguration starter for Apache Solr and trying to decide what is the correct behaviour (convention over user friendliness).
Essentially it seems to ...
0
votes
0
answers
47
views
JPA/Hibernate: Backfill process generates duplicate primary keys (id=1) when deleting and recreating child entities
I'm implementing a backfill process to re-enrich old commit data in my application. This involves:
Marking old commits as BACKFILL_PENDING
For each commit: delete existing enrichment data, then re-...
0
votes
0
answers
85
views
Make spring data jpa return related entities
I have relation set between two classes
Nested class:
@Column(name = "owner_id", nullable = false)
private UUID ownerId;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "...
0
votes
1
answer
220
views
DockerHub: Unable to open JDBC Connection for DDL execution [Could not create connection to database server]
I am learning SpringBoot and I'm making an application that need to connect to a Springboot API. I don't have problem when running my API locally, but when I use Docker it fails to find the database.
...
0
votes
1
answer
116
views
Passing LocalDate to Between comparison for Cosmos DB
I have Cosmos DB database with the following sample data in the container:
{
"postedDate": "2025-01-01",
... Other fields
}
Repository:
public interface TransactionRepo ...
Advice
0
votes
0
replies
40
views
How to apply multi-tenancy pre-filters to all Spring Data Elasticsearch repository queries (including findById and custom @Query)?
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 ...
0
votes
0
answers
29
views
How can I create a "managed type" for a Spring Data 3.4 @NativeQuery interface to access data with?
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 ...
0
votes
1
answer
111
views
Enable Hibernate @Filter as default in Springboot for soft delete
I defined a Hibernate Filter to filter out the deleted records.
My wishlist:
The Filter should be enabled all the time as default.
Only in special cases when I need the deleted records, then I would ...
0
votes
1
answer
82
views
IDs are mismatched when calling Spring Boot REST API from Next.js client generated using OpenAPI/Swagger
I have a Spring Boot Data REST project with the following classes
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Product {
@Id
private String sku;
@OneToMany(...
2
votes
1
answer
201
views
How does Spring JPA âinstantiateâ the interfaces that extends repositories?
I'm delving into Java concepts such as dynamic proxies, reflection, etc. That's why I'm trying to implement some Spring features. Anyway...
I created the dynamic proxy:
@Override
public Object invoke(...
-1
votes
1
answer
215
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 ...
1
vote
1
answer
149
views
@LastModifiedDate is not updated with @ManyToMany relation
In Spring Boot I have an entity:
@Entity
@Table(name = "Product")
@EntityListeners(AuditingEntityListener.class)
public class Product extends BaseEntity {
...
@NotNull
@...
0
votes
1
answer
328
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 ...
0
votes
1
answer
80
views
undefined method error in eclipse in a project correctly building with maven
Eclipse gives me the following error:
The method delete(Sumti) is undefined for the type SumtiRepository DeleteBridiTest.java
The relevant parts of DeleteBridiTest.java:
public class DeleteBridiTest ...
1
vote
0
answers
75
views
Why does findByTypeNotIn in Redis OM Spring generate the same RediSearch query as findByTypeIn?
Iâm using Redis OM Spring with a simple repository:
@Document(value = "Marker", indexName = "MarkerIdx")
data class RedisMarker(
//other indexed
@Indexed
...