Answer the question
In order to leave comments, you need to log in
How to update an object in Realm using its old value?
I am using Realm as a database in my project.
I have the following class which is inherited from RealmObject:
public class Note extends RealmObject {
private String day,hour, minute;
@RealmField(name = "id")
private int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Note() {
}
public Note(String day, String hour, String minute) {
this.day = day;
this.hour = hour;
this.minute = minute;
}
public String getDay() {
return day;
}
void setDay(String day) {
this.day = day;
}
public String getHour() {
return hour;
}
void setHour(String hour) {
this.hour = hour;
}
public String getMinute() {
return minute;
}
void setMinute(String minute) {
this.minute = minute;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question