What are the typical real life scenarios where one would choose Spring Data JDBC / Spring Data JPA vs Hibernate? I would like to understand the scenarios where either of these implementations are best suited.
I'm curious what is the difference between the spring-jdbc (what I missing in the newest spring release) and spring-data-jdbc.
Is there a difference or just a renaming (in the repositories I don't see this)?
And is there somewhere described what…
I have a database which is using composite keys. Is it possible to utilize spring-data-jdbc? I tried the milestone version 1.1M2 where I mapped my entity in the following way:
class History {
@ID
@Embedded
private CompositeHistoryID …
I'm playing around with spring-data-jdbc and discovered a problem, with I can't solve using Google.
No matter what I try to do, I just can't push a trivial object into the database (Bean1.java:25):
carRepository.save(new Car(2L, "BMW", "5"));
Both,…
In Spring Data JPA we can map an entity to a specific table by using @Table annotation where we can specify schema and name.
But Spring Data JDBC uses a NamingStrategy to map an entity to a table name by converting the entities class name. For…
For Spring Data JPA, I can use @GeneratedValue(strategy = GenerationType.AUTO) to insert a record with a custom id, but for Spring Data JDBC, how do I insert a record with custom id? I hav tried to insert with id, but no exception was thrown and the…
I'm trying to connect to Firebird database using Spring Data JDBC and Spring Boot.
I've created a simple app using Spring Tools. Spring Data JDBC doesn't recognize the dialect. I believe the problem is that the DialectResolver doesn't support…
I'm using CrudRepository.save(Entity) to insert an Entity with @ID already populated.
I'm getting the following exception.
Caused by: org.springframework.dao.IncorrectUpdateSemanticsDataAccessException: Failed to update entity…
i have a not trivial question:
My Case:
Using Spring Data JDBC
Using Two databases
Usage of CrudRepository
As you can see here in Spring Data JDBC you can extends CrudRepository and get with Spring all Crud Operations out of the box - without an…
I have an entity that has a filed of type java.util.Date (or Timestamp, doesn't matter for the case).
public class StatusReason {
@Column("SRN_ID")
private Long id;
@Column("SRN_CREATOR")
private String creator;
…
I tried to create a user/roles relation in RDBMS and want to use R2dbc(Spring Data R2dbc) to shake hands with the backend database.
Assume there are three tables, users, roles, and user_roles.
@Table("users")
class User {
@Id
private String…
I'm trying to use Spring Data JDBC to access a table that has a compound key, and although I can find lots of info on how Spring Data JPA handles this, the same doesn't seem to apply to Spring Data JDBC.
Can anyone give a quick example of how you…
how do i tweak the Spring Data JDBC NamingStrategy to behave like Hibernate´s PhysicalNamingStrategy?
I have the following entity:
/**
* Campus domain model class.
* Handles information about campus.
*
* @author thomas.lang@th-deg.de
…
As I have read in the documentation, Spring Data JDBC supports query creation like Spring Data JPA
For Example:
findByProperty(Property property)
My question :
Does Spring Data JDBC support situation where we create a query and join two (or more)…