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