We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Always
Realm v12.0.0-alpha.2 always use UpdateMode.Never for children objects ignoring mode arg in create function:
UpdateMode.Never
realm-js/packages/realm/src/TypeHelpers.ts
Lines 231 to 238 in d357faf
No response
Code:
import Realm, { UpdateMode } from "realm"; const ASchema = { name: "A", primaryKey: "id", properties: { id: "int", }, }; const BSchema = { name: "B", properties: { a: "A[]", }, }; const realm = new Realm({ schema: [ASchema, BSchema], schemaVersion: 0, inMemory: true, path: "temp_db", }); realm.write(() => { realm.create("A", { id: 1, }); realm.create("B", { a: [{ id: 1 }], }, UpdateMode.All); });
Successful creation
Error: Attempting to create an object of type 'A' with an existing primary key value '1'., js engine: hermes
12.0.0-alpha.2
Local Database only
No
React-native; Android, IOS
Which debugger for React Native: ..
The text was updated successfully, but these errors were encountered:
Thanks for reporting this! I'll put it top of the backlog.
Sorry, something went wrong.
realm.create
UpdateMode.All
Successfully merging a pull request may close this issue.
How frequently does the bug occur?
Always
Description
Realm v12.0.0-alpha.2 always use
UpdateMode.Never
for children objects ignoring mode arg in create function:realm-js/packages/realm/src/TypeHelpers.ts
Lines 231 to 238 in d357faf
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
Code:
Expected
Successful creation
Actual
Error: Attempting to create an object of type 'A' with an existing primary key value '1'., js engine: hermes
Version
12.0.0-alpha.2
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
React-native; Android, IOS
Build environment
Which debugger for React Native: ..
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: