@@ -380,7 +380,8 @@ class CollectionFind
380
380
or a list (or collection) of strings of the form
381
381
`"<expression> AS <path>"`. In the latter case each `<expression>`
382
382
is evaluated and `<path>` specifies where to put the value of
383
- the expression in the resulting document.
383
+ the expression in the resulting document (see `CollectionModify` for more
384
+ information about document paths).
384
385
*/
385
386
386
387
template <typename ... Expr>
@@ -434,6 +435,24 @@ struct Collection_modify_base
434
435
/* *
435
436
An operation which modifies all or selected documents in a collection.
436
437
438
+ Note that in operations such as `set()`, `unset()`, `arrayInsert()` and
439
+ `arrayAppend()` the field argument is specified as a document path. It can be
440
+ a simple field name, but it can be a more complex expression like
441
+ `$.foo.bar[3]`. One consequence of this is that document field names that
442
+ contain spaces or other special characters need to be quoted, for example one
443
+ needs to use this form
444
+ ```
445
+ .unset("\"field name with spaces\"")
446
+ ```
447
+ as `.unset("field name with spaces")` would be an invalid document path
448
+ expression.
449
+
450
+ Note also that wildcard paths that use `*` or `**` are not valid for these
451
+ operations that modify documents.
452
+
453
+ See [MySQL Reference Manual](https://dev.mysql.com/doc/refman/en/json.html#json-path-syntax)
454
+ for more information on document path syntax supported by MySQL server.
455
+
437
456
@ingroup devapi_op
438
457
*/
439
458
0 commit comments