-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
None
-
Affects Version/s: None
-
Component/s: None
-
SDK end 2019-11-26, SDK end 2019-12-03
-
2602
Goals
I want to open and automatically upgrade all core < 6 files with the Realm JS v4 alpha release.
Specifically I want to open and upgrade asset_file.realm.
Expected Results
An upgrade of the file and no runtime errors.
Actual Results
A runtime error is thrown when getting a reference to the owner on the Cat objects.
Steps to Reproduce & Code Sample
const Realm = require('realm'); const realm = new Realm({ path: "asset_file.realm" }); const cats = realm.objects('Cat'); const firstCat = cats[0]; const firstCatOwner = firstCat.owner; // Getting the owner of a cat throws console.log(firstCatOwner);
Throws
const firstCatOwner = firstCat.owner; // Getting the owner of a cat throws ^ Error: Key not found at Object.<anonymous> (/Users/kraenhansen/Projects/delete-me/index.js:5:32) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
Version of Realm and Tooling
- Realm JS SDK Version: v4.0.0-alpha.1
- Node or React Native: N/A
- Client OS & Version: N/A
- Which debugger for React Native: N/A
- is depended on by
-
RSTUDIO-21 Release a version based on Realm JS v6 (Realm Core v6)
- Closed