Skip to content

The condition equalTo() seems wrong #5585

@JarvanMo

Description

@JarvanMo

Here's peek from my java file PlayHistory.java:

public class PlayHistory extends RealmObject{
    @PrimaryKey
    private String id;
    public String categorySn = "";
    public String mediaSn = "";
    private int type = TYPE_AUDIO_ONLY;
}

And this my query:

 PlayHistory playHistory = realm.where(PlayHistory.class)
                .equalTo("type", type)
                .equalTo("categorySn", categorySn)
                .findFirst();

It works well until the categorySn becomes integer, like "11115454454".The playHistory is always null if categorySn is an integer.
I don't know why.
I use Realm-4.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions