fix(core): update

This commit is contained in:
Philipp Kunz 2020-09-09 04:51:56 +00:00
parent bcd10205d3
commit f7342962f4

View File

@ -66,6 +66,11 @@ class Car extends smartdata.SmartDataDbDoc<Car, Car> {
@smartdata.svDb() @smartdata.svDb()
public brand: string; public brand: string;
@smartdata.svDb()
deepData = {
sodeep: 'yes'
};
constructor(colorArg: string, brandArg: string) { constructor(colorArg: string, brandArg: string) {
super(); super();
this.color = colorArg; this.color = colorArg;
@ -97,6 +102,9 @@ tap.test('expect to get instance of Car', async () => {
const myCars = await Car.getInstances<Car>({ const myCars = await Car.getInstances<Car>({
brand: 'Volvo', brand: 'Volvo',
}); });
const myCars2 = await Car.getInstances<Car>({
'deepData.sodeep': 'yes',
} as any);
expect(myCars[0].color).to.equal('red'); expect(myCars[0].color).to.equal('red');
console.log(`took ${Date.now() - timeStart}`); console.log(`took ${Date.now() - timeStart}`);
counter++; counter++;