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

Updating an element within an array of embedded schema behaves differently on Realm 12 and 11 #6239

Closed
andreyukD opened this issue Nov 7, 2023 · 4 comments · Fixed by #6242

Comments

@andreyukD
Copy link

andreyukD commented Nov 7, 2023

How frequently does the bug occur?

Always

Description

Realm 11.9.0 and 12.0.0 have different behavior when updating an element in an array within an embedded schema. If a change is desired, how can an element be updated in this case?

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

I've created an example to show the difference between Realm 12.0.0 and 11.9.0.

https://github.com/andreyukD/reproduce-realmjs-issue

Starting point was npx create-expo-app MyAwesomeRealmApp --template @realm/expo-template

I've added a new field items in Task schema

Commit with v12 andreyukD/reproduce-realmjs-issue@897316a

Branch with v11, code remained unchanged, only the Realm version was updated https://github.com/andreyukD/reproduce-realmjs-issue/commits/v11

v11-9-0.mp4
v12-0-0.mp4

Version

12.0.0 / 11.9.0

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

macOS 14.0

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

@kneth
Copy link
Member

kneth commented Nov 8, 2023

@andreyukD Thank you for the bug report and the code to reproduce it. We need to investigate, and will get back to you.

@kneth
Copy link
Member

kneth commented Nov 10, 2023

@andreyukD We have a fix in #6242. Thank you for bringing it to our attention ❤️

@andreyukD
Copy link
Author

@kneth Thanks for the quick response and fix! I'll test it out once the fix has been merged.

@sync-by-unito sync-by-unito bot closed this as completed Nov 16, 2023
@andreyukD
Copy link
Author

Can confirm that bug was fixed in Realm v12.3.1
andreyukD/reproduce-realmjs-issue@33777db

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants