Skip to content

Poor behavior of Realm with transient keyword #5889

@AntonAndreevEpam

Description

@AntonAndreevEpam

Goal

I am having few cases where I needed to exclude fields from Gson serialization, but I need them in my Realm database.

Expected Results

Previously I used transient keyword for such cases and it worked fine.

Actual Results

Right now I'm having java.lang.IllegalArgumentException: Field does not exist exception when trying to do a query by using field marked as transient.

I found out that this is happening because of behavior implemented in this issue #4279

Fields marked as transient are ignored even if I put @Required on them.

Version of Realm and tooling

Realm version(s): 5.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions