meteor-react-native icon indicating copy to clipboard operation
meteor-react-native copied to clipboard

Collection.update does not work on the server

Open varunwyest opened this issue 3 years ago • 4 comments
trafficstars

Describe the bug When we use the Collection.update method it is taking a string as the ID which updates it perfectly on the local but is not able to update the server with the server with that id.

Any suggestions on how to update an object

varunwyest avatar May 24 '22 19:05 varunwyest

Hi @varunwyest, could you confirm that this works in your web client code? Your server must be configured with allow deny for this to work.

TheRealNate avatar May 27 '22 16:05 TheRealNate

Yes, I tested it thoroughly in the meteor app as well outside of react native the behaviour is exactly the same when we dont use the Object ID. Without the object id, just passing in the string it does not update document, but gives no error.

When using the Object ID it updates the data perfectlty. I can try to take a stab at updating this code if you are okay with it. I just dont want to fork and create our own as this will be helpful to everybody.

varunwyest avatar Jun 01 '22 17:06 varunwyest

+1

sdhimanwyest avatar Jun 06 '22 04:06 sdhimanwyest

@varunwyest just want to clarify, are you saying {_id:"..."} is working (object with _id field)?

TheRealNate avatar Jun 07 '22 15:06 TheRealNate

Closing this issue due to no activity. Feel free to reopen.

github-actions[bot] avatar Dec 02 '22 02:12 github-actions[bot]

If this issue persist it's likely a minimongo issue. Feel free to reopen.

jankapunkt avatar Mar 17 '23 07:03 jankapunkt