Getting below error while loading data from database
java.lang.IllegalStateException: Required identifier property not found for class com.sudhirt.practice.springdatajdbcpractice.entity.AuthorRef!
at…
Does spring-data-jdbc consider providing annotations like JPA ID generators? The current way of using events needs to be defined too much, or you need to inherit the base class to implement. Or the current version already provides similar features,…
I have seen the response in the previous question! , but it did not solve my problem.
I traced the code of spring-data-jdbc and found that as long as the BeforeSaveEvent event is customized and a custom ID is set in this event, after the custom…
I am planning to use Spring JdbcTemplate to access my database. Is it a must to use spring-data-jdbc when using JdbcTemplate? The reason I am asking is I don't need "entity"(POJO) for my table in my application. Would it add some overheads if I use…
I'm trying out Spring Data JDBC, and I think that immutable entities are the key feature here.
I want to model a one-to-many relationship between Team and Player and have these entities immutable. What I have working right now…
We are using latest Spring Data JDBC milestone (1.1.0.M3) together with SQL Server.
Updating referenced aggregates (not the aggregate root itself) - fails with:
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert explicit value for…
I am trying to persist an object containing an embedded one using Spring Data JDBC. And it is not saved because it does not pass a null-check.
I created an outer class to persist.
data class Outer(
@Id
val id: Long,
val value:…
I created a custom repository interface that extended by CrudRepository.
I just used @EnableJdbcRepositories in StartApplication.
When I test a method from my custom repository, such as save(T t) I seen it be instanced by…
Hi I would like to stream a very large table spring-data-jdbc. For this purpose
I have set my connection to READ_ONLY I have declared in my repository a method that looks in the following way:
PackageRepository extends Repository…
The last version of spring-boot-starter-jdbc contains spring-data-jdbc 1.0.5 version. I am trying to update the version of the spring-data-jdbc. But the console shows me a problem.
Caused by:…
Hi I used spring data to map my Entity and Repository. The mapping is very simple:
public class Car {
Set parts;
}
public class Part {
}
I use the findAllByIds(Iterable) interface of my spring data repository. And it generates a nice…
I have my version column defined like this
@org.springframework.data.annotation.Version
protected long version;
With Spring Data JDBC it's always trying to INSERT. Updates are not happening. When I debug I see that, PersistentEntityIsNewStrategy is…
Problem Description -
Saving aggregate roots without embedded entities works fine
The issue arises when saving an aggregate root which aggregates another entity (one-to-one containment relationship)
Spring Data JDBC seems to behave correctly as I…
So, the case is the following.
I have a piece of code that looks like this:
public interface CustomRepo extends CrudRepository {
@Query(value = "select * from custom")
public List findAll();
}
Together…
Hello there i have a question concerning the right way of modelling immutable entities:
Consider this entity (edited as of the suggestion by Jens Schauder):
@Getter
@RequiredArgsConstructor(staticName = "of", access = AccessLevel.PACKAGE)
public…