-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Realm Babel
-
2 - S (<= 1 week)
-
5111
How frequently does the bug occur?
All the time
Description
Demo code when working with @realm/babel-plugin@0.1.0 and realm@11.1.0 :
import Realm from "realm"; export class NoteSchema extends Realm.Object<NoteSchema, "content"> { // @ts-ignore static name = "MyNote" _id = new Realm.BSON.ObjectId() createdAt = Date.now() content!: string }
After babel transformation, createdAt was missed in schema:
NoteSchema.schema = { name: "NoteSchema", properties: { _id: { type: "objectId", default: function _default() { return new _realm.default.BSON.ObjectId(); } }, content: { type: "string" } }, name: "MyNote" };
Stacktrace & log output
No response
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
@realm/babel-plugin@0.1.0 and realm@11.1.0
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
it's just a js side issue
Build environment
No response
Cocoapods version
No response