From afa7c2fe615fafd657c7593534f632b9bf5ccd50 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 4 Sep 2019 17:41:53 +0200 Subject: [PATCH] fix(core): update --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0879956..5b13d47 100644 --- a/README.md +++ b/README.md @@ -66,16 +66,19 @@ So to get to get access to a specific collection you document @smartdata.Collection(smartdataDb) class MyObject extends smartdata.DbDoc { // read the next block about DbDoc - @smartdata.svDb() property1: string; // @smartdata.svDb() marks the property for db save + @smartdata.svDb() + property1: string; // @smartdata.svDb() marks the property for db save + property2: number; // this one is not marked, so it won't be save upon calling this.save() - constructor(optionsArg: { property1: string; property2: number }) { - super(); + + constructor() { + super(); // the super call is important ;) But you probably know that. } } // start to instantiate instances of classes from scratch or database -let localObject = new MyObject({ +const localObject = new MyObject({ property1: 'hi', property2: 2 });