Skip to content

addAllUnique() on Parse.User is not a function #4704

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
venkataramanab opened this issue Apr 8, 2018 · 4 comments
Closed

addAllUnique() on Parse.User is not a function #4704

venkataramanab opened this issue Apr 8, 2018 · 4 comments

Comments

@venkataramanab
Copy link

Issue Description

Parse.User.addAllUnique() is not a function

Steps to reproduce

Used on Parse Cloud Code on beforeSave(Parse.User,{})

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 2.7.4
    • Operating System: Mac 10.10.5
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
  • Database

    • MongoDB version: mongodb-core: 2.1.15
    • Storage engine: WiredTiger
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): localhost

Logs/Trace

Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.

user ParseUser { _objCount: 0, className: '_User' }
error: Error generating response. ParseError {
  code: 141,
  message: TypeError: user.addAllUnique is not a function
    at /Users/venkataramana/Documents/parse-server/cloud2.js:180:18
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7) } code=141, 
@flovilmart
Copy link
Contributor

Can you double check your parse server and JS SDK version? Are those methods available on any other object?

@venkataramanab
Copy link
Author

After updating to [email protected] resolved my Issue.

@venkataramanab
Copy link
Author

before updating to [email protected], I didn't see this in ParseObject.js

{
    key: 'addAllUnique',
    value: function (attr, items) {
      return this.set(attr, new _ParseOp.AddUniqueOp(items));
    }

@flovilmart
Copy link
Contributor

Awesome!

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

2 participants