Skip to main content

All Questions

Tagged with
0 votes
0 answers
19 views

Value of one field in one entity has been changed after hibernate call saveOrUpdate

One object has been sent to hibernate saveOrUpdate method for updating the data. Before save the value of one field was different and after save the value in the object got changed. Is this one of the ...
Summa Summa's user avatar
0 votes
1 answer
75 views

How can I insert data into a 1-n relation table in Spring Boot JPA without updating the User table?

User @Data @NoArgsConstructor @AllArgsConstructor @Builder @Entity @Table(name = "user") public class User { @Id @GeneratedValue(strategy = GenerationType.UUID) @Column(name = &...
An Nguyen's user avatar
0 votes
1 answer
762 views

ModelMapper DTO-->Entity. How to skip unconditionally all fields not mapped

I have two classes (entity and DTO) public class Deliver { private Long id; private String uri; private Instant moment; private DeliverStatus status; // enum PENDING,ACCEPTED,...
Giovanni's user avatar
0 votes
1 answer
362 views

How to change name of a field in MongoDB with java for each document in the collection?

Due to some decisions I will have to change the name of some fields in all documents in a single collection. For purpose of automation testing I am inserting documents and then checking some logics. ...
Alex's user avatar
  • 75
0 votes
1 answer
556 views

Hibernate batch update issue

For a simple batch update of a MariaDB table, properly mapped as a Hibernate entity class, a simple update via Hibernate produces the error org.hibernate.StaleStateException: Batch update returned ...
PNS's user avatar
  • 19.7k
0 votes
1 answer
775 views

Best strategy for Massive Insert/Update using jdbc in mssqlserver

Good Day, I posted this question previously but it seems I am not clear enough so I will try to be as detailed as possible here about my situation. I need to implement a solution to do a daily ...
rread's user avatar
  • 153
1 vote
1 answer
1k views

Partial insert update of Hibernate JPA Model using the Repository Save or SaveAll methods without @Transient or @DynamicUpdate annotations in Model

I have my model @Entity public class Person{ @Id @Column(name = "id") String Id; @Column(name = "name") String name; @Column(name = "location") String location; @Column(...
user1895917's user avatar
1 vote
1 answer
1k views

"insert ignore" or "on duplicate key update" using @Query & @Modifying without using nativeQuery or save() or saveAndFlush() JPA Hibernate

My example is below: Person is a simple Entity with 3 fields "Long id, String name, Integer age", and, maps to a corresponding Person table with 3 columns per above) @Repository public ...
user1895917's user avatar
1 vote
1 answer
3k views

Is this a correct solution to the Spring Data JDBC problem of the insert/update? [duplicate]

PROBLEM: when I tried to create a new entity 'Customer' with Spring Data JDBC (in a Spring-boot application) @Data public class Customer { @Id private String identifier; private String ...
FabianSR's user avatar
0 votes
0 answers
21 views

Java JDBC SQL rewriting one table to another [duplicate]

Hello I have table "players" and I try to rewrite my results from "players" to empty table "second_players". Now I have ony first result, but I want all results in my new table. How can I do it i ...
HappyProgrammer's user avatar
0 votes
1 answer
2k views

Bulk insert from a csv to a table in an Oracle DB using Java

I am attempting to insert a table in an Oracle DB using java. I am reading a csv file line by line using OpenCSV. The csv is about 50000 rows and 9 columns. Here is some of my code: /* ...
Ryan Conway's user avatar
0 votes
0 answers
185 views

How do I update a folder with Google Drive API in Android?

I'm trying to use the Google Drive files.update method in Java to update a folder. By update, I mean replace all the contents with whatever the contents that the new folder has. This is the method I'm ...
rblz's user avatar
  • 1
1 vote
2 answers
155 views

How do I get my sql update method to work?

I am doing a method where it should update the location of a tag (card) I have in my local database, this method (UpdateWallet) takes the user's input and overwrite the record in my database according ...
Yamen's user avatar
  • 35
0 votes
2 answers
4k views

android.content.ActivityNotFoundException: Unable to find explicit activity class { have you declared this activity in your AndroidManifest.xml?

I'm having these error android.content.ActivityNotFoundException: Unable to find explicit activity class {}; have you declared this activity in your AndroidManifest.xml? at android.app....
lilin's user avatar
  • 117
0 votes
1 answer
41 views

Java Mongodb update Database Object

I work with upload data that is stored in one collection. The data contains information about the upload date as an integer value so I want to create one Object in the collection that holds all the ...
FishingIsLife's user avatar

15 30 50 per page