Bug #84547 Error when mysqlx tries to parse json object while modifying data (Nodejs)
Submitted: 18 Jan 2017 7:11 Modified: 27 Jan 2017 10:59
Reporter: Tanvi Shah Email Updates:
Status: Verified Impact on me:
Category:MySQL Connectors: Document Store: DevAPI Severity:S2 (Serious)
Version:Connector-Nodejs version - 1.0.5 OS:Any
Assigned to: CPU Architecture:Any
Tags: document-store, mysql/xdevapi, NodeJS

[18 Jan 2017 7:11] Tanvi Shah
I want to update my MySQL document store schema.I am using @mysql/xdevapi for document store.I have referred this link for example <a href="http://insidemysql.com/develop-by-example-document-store-working-with-collections-using-no...">Reference Link</a>

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".

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

How to repeat:
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.
[27 Jan 2017 10:59] Chiranjeevi Battula
Hello Tanvi Shah,

Thank you for the bug report.
Verified based on internal discussion with dev's.