You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in donejs/donejs#900 MongoDB gives special significance to queries where a nested object is provided, this does a match against the entire nested object rather match against the individual properties of the nested object.
To match against the individual properties of a nested object you have to pass query parameters using 'dot notation' i.e {"address.city":"Chicago"} instead of {address:{city:"Chicago"}}. To support this in can-set you need to add a set comparator for each nested property you query like this. This comparator has to pick the specified nested property out of the set member and do a comparison to the query parameter without assuming which argument will be the query parameter and which will be the set member.
To make adding comparators like that easy we'll be adding a new can-set prop set.prop.dot to be used like:
The text was updated successfully, but these errors were encountered:
As discussed in donejs/donejs#900 MongoDB gives special significance to queries where a nested object is provided, this does a match against the entire nested object rather match against the individual properties of the nested object.
To match against the individual properties of a nested object you have to pass query parameters using 'dot notation' i.e
{"address.city":"Chicago"}
instead of{address:{city:"Chicago"}}
. To support this in can-set you need to add a set comparator for each nested property you query like this. This comparator has to pick the specified nested property out of the set member and do a comparison to the query parameter without assuming which argument will be the query parameter and which will be the set member.To make adding comparators like that easy we'll be adding a new can-set prop
set.prop.dot
to be used like:The text was updated successfully, but these errors were encountered: