I was reading the Spring data JDBC docs and doing experiments. While doing that I was trying to make simple one to many relationships using @MappedCollection annotation in then parent class and getting the error saying column not found. However I…
I try to order my custom query with a custom parameter like so:
@Query("select * from person where firstname = :name" + " order by :order")
List findByFirstNameCustomQuery2(@Param("name") String name, Pageable page,
@Param("order") String…
I'm struggling to trying the pagination feature, as described in the reference document.
This is my table schema:
CREATE TABLE cities
(
id int PRIMARY KEY,
name varchar(255),
pref_id int
);
Repository:
public interface…
I like the approach of spring-data-jdbc very much, but it seems it does not have support for Oracle. https://docs.spring.io/spring-data/jdbc/docs/2.0.1.RELEASE/reference/html/#requirements
Is it possible to manage with Mybatis all what can be done…
In my springboot application I want to connect to two datasources, a cassandra DB and an oracle DB.
So, I have added the below to my pom.xml:
org.springframework.boot
…
I have a Spring Boot project that uses Spring Data JDBC. The tests use HSQLDB. My repository tests started failing when I attempted an upgrade to Spring Boot 2.3.0.
Spring Data JDBC appears to now quote table and column names. The version of Spring…
I'm struggling with making order parametrised. The best would be to have
... order by :orderColumn :orderDirection ...
Is it even possible to turn:
@Query("select * from Document where folderId = :folderId AND documentType = :documentType"
…
I face a strange issue after upgrading my existing code from spring boot 2.2.0 to 2.2.1.
It seems that my spring data jdbc repositories are not getting scanned anymore somehow:
Caused by:…
I'm trying to map a Resource class which has a Map field using Data JDBC. Here is simplified entity:
public class Resource {
@Id
private Long id;
private Map props;
}
I don't want a separate table for props, just a…
I´m facing some strange version issues concerning Spring Boot with Spring Data (JDBC).
Excerpt from my pom:
org.springframework.bootspring-boot-starter-parent
…
I am trying to use the Spring Data JDBC and I cannot understand if there is a possibility to customize the column names of the embedded object (in JPA we use @AttributeOverrides for this).
In my model I created a class Amount they I would like to…
I noticed that Spring Data JDBC doesn't seem to implemented Optimistic Locking (something like a JPA's @Version annotation).
I was thinking on creating a @Modifying query which considers the version field and returns boolean to check manually if the…
I want to model One-To-One relationship using Spring Data JDBC and PostgreSQL but I'm having trouble setting up root aggregates the right way.
There's following scenario: Picture, SQL
Each engine is unique, car has unique column engine_id which is…
I want to be able to map a enum declared in java to an enum created in postgres. For example having the following:
CREATE TYPE EYE_COLOR AS ENUM ('BROWN', 'BLUE', 'GREEN');
CREATE TABLE PERSON (
ID INT PRIMARY KEY AUTO_INCREMENT,
NAME …