How to modify ie update MySQLx Document Store Data

171 views Asked by At

I want to update my MySQL document store schema.I am using @mysql/xdevapi for document store.I have referred this link for example Reference Link

For single field it is working properly.But when i am updating whole object it throws an error as "Provided expression is neither a expression string nor a parse tree".

Single field syntax:-

coll.modify("$._id == '100'").set('$.name', 'New name').set('$.description', 'New Description').execute();

This is working fine.

Updating object : -

var obj = {"name":"New Name"};
coll.modify("$._id == '100'").set(obj).execute()

This is not working.

Kindly suggest, is there any other way to do this.

0

There are 0 answers