Skip to content

increment inset filelds error #5327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
puny-d opened this issue Jan 28, 2019 · 6 comments
Closed

increment inset filelds error #5327

puny-d opened this issue Jan 28, 2019 · 6 comments

Comments

@puny-d
Copy link

puny-d commented Jan 28, 2019

My scheme design: Product
{ objectId: xxxxxxxxx, sku:{ "1548573702": { "count": 12, ...... } } }

so if I want to increment the count, I would
some.incement("sku.1548573702.count",1)

And count expect to be 13, but the result is

{ objectId: xxxxxxxxx, sku:{ "1548573702": { "count": ":{"__op":"Increment","amount":1}", ...... } } }

Parse-server: 3.1.3
Postgresql: 9.5.4

@dplewis
Copy link
Member

dplewis commented Jan 30, 2019

Would you like to do a PR?

@dplewis
Copy link
Member

dplewis commented Feb 6, 2019

@flovilmart I remember you were against updating / setting nested documents. Are you still against this feature?

@flovilmart
Copy link
Contributor

Well, that’s messy and prone to error. Just wondering how good it can be, given that PG isn’t great at that

Sent with GitHawk

@dplewis
Copy link
Member

dplewis commented Feb 6, 2019

Setting fields in a nested document is already optional. We can make the rest optional as well

Edit: Per my comment here parse-community/Parse-SDK-JS#680 (comment) and the PHP SDK already supports this

@flovilmart
Copy link
Contributor

flovilmart commented Feb 6, 2019

alright let's go then. but there is nothing 'optional'. It's there or not there :)

@stale
Copy link

stale bot commented Mar 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 23, 2019
@stale stale bot closed this as completed Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants