I am trying to add a custom query to a Spring Data JDBC CrudRepository to allow finding entities by an alternate natural key. The entity has an ID which is in this case a Long, and a natural key, that is of type Reference (underlying type is…
I've a model named Role. A role has a list of Permissions, simple as that.
Using org.springframework.boot:2.2.5.RELEASE, spring-jdbc version 5.2.24, mysql-connector-java-8.0.19, mysql server version 5.7.28
You can also checkout…
I'm trying to model a Father/Children relationship in Spring Data JDBC (version 1.1.5.RELEASE). So far i've managed to get the insert operation working, but i'm struck with an error when reading the data.
Entities look like…
class Game(
@MappedCollection(idColumn = "game") <---- unnecessary
var rules: List = emptyList(),
){
@Id
var id: Long? = null
}
data class Rule(
@MappedCollection(idColumn = "rule", keyColumn = "rule_key")<----…
I am playing around with Kofu functional Bean DSL. I am using Spring-Data-JDBC with Spring-MVC and trying to autowire NamedParameterJdbcTemplate. However, I am have been receiving this error that no beans found for it while running tests. In a…
I'm trying to save into a table with an Oracle identity field (it's some sort of auto increment). But as soon as I do that I get an "identity must not be null after save" exception ?
Is this scenario currently not supported or do I need a special…
I have an Oracle database with a table that has a DESCRIPTION column of type CLOB.
My POJO looks like this:
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import…
Spring Boot JDBC with Spring Boot: 2.2.4.RELEASE, in gradle the dep:
implementation ("org.springframework.boot:spring-boot-starter-data-jdbc")
The dep to -data-jpa (see "duplicated question")
//implementation…
Version: 1.1.2.RELEASE
I have the following simple test code
JobTask task1 = new JobTask(null, "task1", "sync files", JobStatus.RUNNING);
JobTask savedTask = jobTaskReponsitory.save(task1);
savedTask.setTaskDesc("update descript.");
…
I was implementing a project with spring-data-jdbc and I found the Statement Builder API. I could this API be used for building native sql repositories?
I'm using Spring Boot 2.2.0.RELEASE and spring-data-jdbc 1.1.0.RELEASE
Tried to implement nested one to many relationship using spring-data-jdbc.
One book has many chapters and each chapter has many parts.
public class Book {
private…
I noticed, as soon as I un-comment JPA dep, see below:
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation ("org.springframework.boot:spring-boot-starter-data-jdbc")
//implementation…
I'm trying to make some field readOnly -> insert and update aka save() should not send that field to DB but the field should be populated with select.
@ReadOnlyProperty from org.springframework.data.annotation.ReadOnlyProperty does not do the…
I am new to spring-data-jdbc and just trying to port a small project, which currently uses JPA, for evaluation purposes.
My existing entities use a database schema which can easily be defined by JPAs @Table annotation on the entity level.
I saw,…
I am following the spring.io blog here: https://spring.io/blog/2018/09/24/spring-data-jdbc-references-and-aggregates and have a sample SpringBoot app with Book and Author entities here: https://github.com/b-sridhar/spring-data-jdbc-example.
I get…