I have a application_user table with a corresponding UserEntity record. Additionally, I have a user_meta_data table with a UserMetaDataEntity record as a 1:1 relation to the user.
@Table("application_user")
record UserEntity(@Id @Nullable Long id,
…
I have a Spring application where the Domain Object identifier is not assigned by the database, but it generated by the application. The identifier is generated and added to the Domain Object during the BeforeSave callback. After saving the domain…
I'm interested to use an AnsiDialect from spring-data-jdbc to connect to my Oracle database using a proprietary driver. However, this dialect is not present in spring-data-jpa (only contains dialects from hibernate)
Is there a way to do this, or do…
I want to write a custom converter in Spring Data JDBC like this -
@ReadingConverter
public class IntegerToStringConverter implements Converter {
@Override
public String convert(Integer source) {
return source !=…
Hello together I am currently trying to persist an entity to the database with a 1 to 1 relationship.
I am using spring version 2.5.3 (spring-boot-data-jdbc).
When I try to persist via rest post and the usual crud repository save() method with this…
I have two tables, these are profile_info and user_Info.
Database ER-diagram
Table creation:
CREATE TABLE `user_info` (
`id` int NOT NULL AUTO_INCREMENT,
`userLogin` varchar(20) DEFAULT NULL,
`userPassword` varchar(60) DEFAULT NULL,
…
I am trying to evolve a domain which it includes and Aggregate-root implemented with Java Records and I am not able to find a way to use the Domain Event concept to propagate events from one…
I have two tables, these are profile_info and user_Info.
Database ER-diagram
Table creation:
CREATE TABLE `user_info` (
`id` int NOT NULL AUTO_INCREMENT,
`userLogin` varchar(20) DEFAULT NULL,
`userPassword` varchar(60) DEFAULT NULL,
…
this is my entity
@Table("amazon_rds_inventory")
public class AmazonDBInstanceDataSelect {
@Id
@Column("id")
private long id;
@Column("inventory_metadata")
private String inventoryMetadata;
@Column("aws_identifier")
…
I'm using Spring-Boot 2.5.0, Java 11, a Postgres DB and Lombok. I have e.g. a list of articles as an entity:
@Data
@Builder
@AllArgsConstructor
public class Articles {
@Id
private Long id;
@Builder.Default
private List…
I am using Spring Data JDBC.
I have an entity that has fields annotated with @CreatedDate and @LastModifiedDate.
However, in some cases I want to set these two fields manually.
Is there a way to bypass @CreatedDate and @LastModifiedDate in some…
I am trying to upgrade from Spring Boot 2.2.x to 2.3 I have encountered an issue with the upgrade of spring-data-jdbc. In 1.1.x one could write the following query and it would work as expected
@Modifying
@Query("UPDATE monitoring SET…
I am using spring data JDBC.
I normally use the specific repository object as auto-wired and perform the necessary operation.
Let us consider, I have employees who belong to a specific continent.
We have a repository for each continent.
After…
I have longitude and latitude coordinates saved in a database and would like to map it to a MySQL POINT column in another MySQL table.
I'd like to use spring data Point in my code with the constructor Point(double x, double y). Unfortunately, I…
I had a repository like so:
@Repository
interface Repository {
@Query("insert into t values (cube(:array))")
void save(float[] array)
}
which gives there error Unable to find server array type for provided name REAL.
I even tried to…