Questions tagged [spring-data-jdbc]

Spring Data JDBC is part of the Spring Data umbrella project which makes it easy to implement JDBC based repositories.

Spring Data JDBC Project page.

Github Repository.

Introduction into Spring Data JDBC or if you prefer video over text try this 10 minute video introduction.

The very important topic of Aggregates and its ramifications for Spring Data JDBC.

FAQ

324 questions
0
votes
2 answers

spring-data-jdbc update with repository save methods updates ID

Calling CrudRepository save() method for an entity that is NOT new creates following sql: UPDATE card SET id = ?, customer_id = ? ... WHERE id = ? This raises exception Cannot update identity column 'id' ID is generated by the database used version:…
0
votes
1 answer

Spring data jdbc seems not working with final attributes

I'm trying spring data JDBC (1.1.0.M3). I have a Formateur (Teacher) class which contains an email attribute (class Email). Email is an immutable class. When I retrieve all the teachers from the database, I have the following exception:…
Flam
  • 3
  • 2
0
votes
1 answer

Generate script sql from "Entities" of spring-data-jdbc

I need to create sql script using spring-data-jdbc. Using spring-data-jpa I have no problems, but I want to know if there is the possibility of performing the scripts automatically using spring-data-jdbc I achived it using spring-data-jpa, but I can…
0
votes
1 answer

Spring4 + SpringDataJDBC, how to define the bean for MyRepository in configuration file

Note: I am not using Spring Boot I am getting the error as below org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.repository.MbrEnrollRepository] found for dependency: expected at least 1 bean which…
paardhu
  • 101
  • 8
0
votes
2 answers

Using Spring Data JDBC in a Spring Boot app

I'm looking for information about how to configure Spring Data JDBC in a Spring Boot app (a Gradle example would be ideal). I've read through the docs, and I know that I need to define a Repository implementation for each domain class (or…
Dónal
  • 185,044
  • 174
  • 569
  • 824
-1
votes
1 answer

Only simple models in Spring Data JDBC

Im not sure if i can use Spring Data JDBC also for complex models. My doubts arise especially cause in the Spring Data JDBC (3.0) documentation is written: "There is a simple model of how to map entities to tables. It probably only works for rather…
-1
votes
1 answer

Should spring-data-jdbc EntityRowMapper be allowed to skip properties not in source map?

We are considering introducing Spring Data JDBC into our existing project, to minimize boilerplate code - but we ran into a snag: we have bean-classes that capture all the columns in a table, but we use queries that do not retrieve all the columns…
moilejter
  • 958
  • 8
  • 9
-2
votes
1 answer

Spring Data JDBC: Error - Cannot set property id because no setter, no wither, and it's not part of the persistence constructor

I am a beginner in spring and trying to use Spring Data JDBC to persist data. I have made the necessary changes to the Repository interfaces by extending them with Repository/CrudRepositoy. Also, for preloading data into the h2 database, I have also…
-3
votes
1 answer

Spring data with R2DBC(Mysql) Example for one to many association

Can I know how to do association(One to Many) in Spring data JDBC with R2DBC(Mysql).Please provide small code example or git link if possible. For Example, I have one employee table and address table is child of employee. One employee can have…
1 2 3
21
22