Is it possible to use spring-data-rest without spring-data-jpa?
In my application I use JdbcTemplate. Can this be wired to spring-data-rest somehow?
Update from 4 years later:
Meanwhile there is spring-data-jdbc which looks like it answers the…
Given the following field in Java:
private Instant createdDate = Instant.now();
corresponding to the following field in Postgres:
created_date TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP;
and saved to database using Spring Data JDBC…
I have an annotated entity object with custom table and field names which i use with Spring Data JDBC (not JPA). Smth like:
@Data
@Table("custom_record_table")
public class Record {
@Id
@Column("id_field")
Long id;
String name;
…
I have 2 linked tables in the same aggregate but Spring Data JDBC does not use join for retrieving data. It does several Select requests instead, and I don't see why.
The tables:
TestA (aggregate root)
idA (integer, PK)
TestB
idB (integer,…
I am using simple crud operations with auditing in spring data jdbc. so when ever i insert new record auditing works absolutely fine. but when i am updating my record my createdby and createddate setting to null. is there any way i can avoid…
Trying to solve a problem where I have a class Student.
public class Student {
@Id
UUID id;
String name;
Long year;
List attributes;
}
And a class Attribute
public class Attribute {
@Id
private UUID id;
…
I want to have enum as a field for my entity.
My application is look like:
Spring boot version
plugins {
id 'org.springframework.boot' version '2.6.2' apply false
repository:
@Repository
public interface MyEntityRepository extends…
Default DAO layer / ORM framework in Quarkus is Panache (on top of Hibernate). It's very weird, since i didn't find any built-in integration for pluggable external L2 cache implementations like Redis.
Quarkus is called cloud-native but in real…
I am testing some rollback capabilities with Spring Data JDBC, but reviewing the logs from one test execution, I don´t see that log with something like "Rollback for xxx"
Log…
I am using spring-data-jdbc to persist the following entity into PostgreSQL
@Table("abc_configurations")
data class AbcConfiguration(
val name: String,
val distribution: Map
)
The distribution is a jsonb column in PostgreSQL…
I'm new to Spring Data JDBC and create a Customer aggregate with two Address values using Spring-Boot 2.5.0, Java 11 and Lombok (code examples simplified).
I have one Customer entity (aggregate root) and one Address value…
I am currently using myBatis for my project, it is good for complex SQL, but I found that I need to create many redundant SQL for basic CRUD. So I come across spring-data-jdbc (here), which is a very nice library (similar to spring-data-jpa but…
There are several multitenancy models around https://vladmihalcea.com/database-multitenancy/
Dedicated DB per tenant
Shared DB, but one schema per tenant
Shared schema with tenantId discriminator column per table
Are there any plans to support…
I have an init script to be executed on testcontainers (postgres) startup.
My setup is:
spring boot
spring data jdbc
testcontainers on docker
postgresql
All framworks are up to date as of today.
This is an excerpt of the script:
create or replace…
My schema will be something similar to the above picture.
I am planning to use Spring data JDBC and found that
If multiple aggregates reference the same entity, that entity can’t be part of those aggregates referencing it since it only can be part…