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
Given a Mongoose service configured for relationships with { ref: 'modelName' }, when subscribing via a .find() query that includes the special $populate parameter, and a patch update is received, the record is overwritten with the update (as opposed to merged) and the related (ref) record data is replaced with its ObjectId.
So while you may initially get this list in your .find({ $populate: 'post' }).subscribe(fn) handler:
[
{
comment: 'Feathers is so cool',
post: {
_id: '1afsd09fj2e92f09qjf09234f',
slug: 'cool-feathers-features'
}
}
]
A patch to one of the query results will become this:
[
{
comment: 'Feathers is so cool',
post: '1afsd09fj2e92f09qjf09234f'
}
]
That said, this problem can be addressed with .watch({ listStrategy: 'always' }).
Not sure if this case is expected based on this statement from the documentation:
smart (default) - Returns a stream that smartly emits updated list data based on the services real-time events. It does not re-query any new data (but does not cover some cases in which the always strategy can be used).
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Apologies if the issue could not be resolved. FeathersJS ecosystem modules are community maintained so there may be a chance that there isn't anybody available to address the issue at the moment. For other ways to get help see here.
Given a Mongoose service configured for relationships with
{ ref: 'modelName' }
, when subscribing via a.find()
query that includes the special$populate
parameter, and apatch
update is received, the record is overwritten with the update (as opposed to merged) and the related (ref
) record data is replaced with itsObjectId
.So while you may initially get this list in your
.find({ $populate: 'post' }).subscribe(fn)
handler:A patch to one of the query results will become this:
That said, this problem can be addressed with
.watch({ listStrategy: 'always' })
.Not sure if this case is expected based on this statement from the documentation:
The text was updated successfully, but these errors were encountered: