Skip to content

Commit 15002f0

Browse files
committed
fix: nested obj
Signed-off-by: Dan Selman <[email protected]>
1 parent 4bea59d commit 15002f0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/demo/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ async function run() {
9999

100100
await graphModel.mergeNode(transaction, `${NS}.Actor`, {identifier: 'Johnny Depp'} );
101101
await graphModel.mergeRelationship(transaction, `${NS}.Actor`, 'Johnny Depp', `${NS}.Movie`, 'Fear and Loathing in Las Vegas', 'actedIn' );
102-
103-
const search = 'Working in a boring job and looking for love.';
104-
const results = await graphModel.similarityQuery(`${NS}.Movie`, 'embedding', search, 3);
105-
console.log(results);
106102
});
103+
const search = 'Working in a boring job and looking for love.';
104+
const results = await graphModel.similarityQuery(`${NS}.Movie`, 'embedding', search, 3);
105+
console.log(results);
107106
await graphModel.closeSession(context);
108107
console.log('done');
109108
}

src/graphmodel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ export class GraphModel {
397397
newProperties[key] = DateTime.fromStandardDate(new Date(value as string))
398398
} else if (value !== null && !Array.isArray(value) && typeof value === 'object') {
399399
const propertyDecl = this.modelManager.getType(property.getFullyQualifiedTypeName());
400-
const childValue = this.validateAndTransformProperties(transaction, propertyDecl, value as PropertyBag);
400+
const childValue:PropertyBag = await this.validateAndTransformProperties(transaction, propertyDecl, value as PropertyBag);
401401
Object.keys(childValue).forEach( childKey => {
402402
newProperties[`${key}_${childKey}`] = childValue[childKey];
403403
});

0 commit comments

Comments
 (0)