-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Realm Babel
-
2 - S (<= 1 week)
-
5253
How frequently does the bug occur?
Always
Description
The Babel plugin does not add a primary key to the static schema of the TypeScript class when the value assigned to static primaryKey is a variable - e.g. a constant.
The following example does NOT get a primary key added to the schema by the Babel plugin:
const key = '_id'; export class MyObject extends Realm.Object<MyObject> static primaryKey = key;
The following example DOES get a primary key added to the schema by the Babel plugin:
export class MyObject extends Realm.Object<MyObject> static primaryKey = '_id';
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
Babel plugin 0.1.1
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Android 11 R API 30 - Pixel 5 emulator
Build environment
Which debugger for React Native: ..
Flipper
Cocoapods version
No response