realm-java icon indicating copy to clipboard operation
realm-java copied to clipboard

Getter in RealmObject return other field's data.

Open hohnamkung opened this issue 10 years ago • 6 comments

Expected Results

Getter in RealmObject should return assigned field's data, not nearby field's data in same RealmObject.

Actual Results

RMessageView(class that have this problem) looks like below

public class RMessageView extends RealmObject {
    private Integer statusOrd;

    private Long index;

    private String readStatus;

    private String syncState;

    private Integer bubbleType;

    private RMessage model;

    private String status;

    private String localID;

    @PrimaryKey
    @Required
    private String key;

    ...
}

public class RMessage extends RealmObject {
    ....
    @PrimaryKey
    @Required
    private String id;

    private String content;
    ....
}

public enum CReadStatus {
    SENDING,
    SEND,
    READ,
    UNKNOWN;
}

readStatus field is used as a enum for sending status (CReadStatus). According to user's report and screenshot, every value from RMessageView.getMessage.getContent() is SEND that i think it is loaded from readStatus.

pasted_image_at_2016_08_05_09_47_am_720

Steps & Code to Reproduce

I can't reproduce it. According to user, this problem was fixed after they re-installed application.

Version of Realm and tooling

Realm version(s): 1.1.0

Which Android version and device: ?

hohnamkung avatar Aug 05 '16 05:08 hohnamkung

this problem was fixed after they re-installed application.

What if user restart the process, will it solve the issue?

beeender avatar Aug 05 '16 05:08 beeender

I am asking because i want to understand if it just a memory corruption or it is a db corruption.

beeender avatar Aug 05 '16 10:08 beeender

I asked it to user, but i'm not sure i'll get a answer. I'll comment if i get a feedback.

hohnamkung avatar Aug 06 '16 03:08 hohnamkung

@hohnamkung I assume you haven't heard from the user, right? And you still cannot reproduce it?

kneth avatar Aug 16 '16 07:08 kneth

According to our CS team, we haven't received any feedback from this user. I also still cannot reproduce it.

hohnamkung avatar Aug 17 '16 09:08 hohnamkung

@hohnamkung I'm closing the issue. If you get any feedback from the user - or can reproduce it - please either reopen or create a new issue.

kneth avatar Oct 03 '16 08:10 kneth