Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realm Cloud allows additive change when property changed from unmapped to mapped #1950

Closed
VagueGit opened this issue Feb 4, 2020 · 1 comment
Assignees

Comments

@VagueGit
Copy link

VagueGit commented Feb 4, 2020

Change this property
{{public string ItemCode { get; set; }}}
to this

[Required]
[MapTo(nameof(ItemCode))]
private string _ItemCode { get; set; }
public string ItemCode
{
    get => _ItemCode;
    set => _ItemCode = value;
}

Realm does not detect Required is an additive change, which is not allowed with Realm Cloud.

@nirinchev nirinchev self-assigned this Aug 26, 2020
@nirinchev
Copy link
Member

Sorry for the super late response - I'm revisiting old issues. To get to the bottom of this, I'll need more context, but the Realm SDK doesn't inherently detect detructive changes. It's the server that does so and rejects them. If you haven't opened the Realm on this device previously or you wiped your local storage, the server error can be caught by subscribing to Session.Error or by opening the Realm asynchronously. I spent some time verifying it works and I couldn't reproduce any surprising behavior.

Due to the age of the issue and due to my inability to repro anything concerning, I'll be closing it, but feel free to reopen if it's still a problem for you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants