Before going to actual issue let me brief what i am looking for.
I am looking for encrypt and decrypt the fields inside entity. in JPA, we can use Attribute converter and achieve this. but in spring data jdbc its not supported it seems.
So, i am…
While integration testing, I am attempting to test the execution of a stored procedure. To do so, I need to perform the following steps:
Insert some setup data
Execute the stored procedure
Find the data in the downstream repo that is written to by…
I want to use Spring Data JDBC with QueryDSL support. According to Spring documentation (https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#core.extensions.querydsl) it is supported, but I couldn't make it working.
I use MariaDB as…
I have a many-to-many relationship person -> person_address <- address and use a reference class. But in my Person aggregate root it seems only adding person_address works (addresses collection):
@MappedCollection(idColumn = "PERSON_ID")
private…
I am using spring-data-jdbc and I have following tables -
table course_details {course_id, course_name}
Example - {1, 'Primary Education'}, {2, 'Secondary Education'}
table course_year {year_id, year_name, course_id}
Example - {1, 'Year 1', 1}, {2,…
I'm in the process of creating a service using Spring Boot (first time using Spring). I have an entity that is identified by a triple (mission, cycle, id) in the database, this is logically the primary key.
To work around the requirement of…
I posted something similar of the same issue a few days ago but now I think I (with the help of some of the people who commented on the post) narrowed it down to know what I need help with exactly. I am trying to use the Spring Data JDBC in my…
I'm using spring boot with spring data jdbc and I got trouble with run my app
I have StudentService class:
package ru.turnip.service;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import…
I am using Spring Data JDBC 2.0.5 (as pulled in by Spring Boot 2.3.5) on top of Postgres 11.10.
In our domain model we have an aggregate root that looks something like the following:
@Table(...)
class OurAggregateRoot {
@MappedColumn(...) //…
I have following table definition:
CREATE TABLE my_table (
id UUID NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY,
result UUID []
);
Entity definition:
@Table("my_table ")
public class MyTable {
@Id
private UUID id;
…
I have following method and it is working. But It doesn't work if I remove @Query annotation.
import org.springframework.data.jdbc.repository.query.Query;
...
@Repository
public interface MyRepository extends PagingAndSortingRepository…
I learned that in Spring Data JDBC I need to implement many to many relationships by having a reference to the ID of one entity in the other entity:
public class Student {
@Id
private Long studentId;
private String studentName;
…
I'm using spring-boot-starter-data-jdbc and infobip-spring-data-jdbc-querydsl-boot-starter(5.4.2) together.
In my tests with org.springframework.transaction.annotation.Transactional annotation I have the following code:
@Transactional
void test() {
…
I am having a very weird experience with spring-boot-starter-data-jdbc:2.6.2.
Two similar queries returning different results. When I use @Query in the repository as shown below, I get back a few columns but the rest returned as…
I have 2 entities:
@Data
@Table("main_entities")
public class MainEntity {
@Id
private Long id;
private String anotherId;
@MappedCollection(idColumn = "main_entity_id")
private SecondEntity…