Skip to content

unsaved children does not work for unsaved Parse.File #1660

Closed
@swittk

Description

@swittk

New Issue Checklist

Issue Description

When saving a new Parse.Object that is saved with a new Parse.File, the following error occurs.

TypeError: object._getId is not a function. (In 'object._getId()', 'object._getId' is undefined)

Likely it's from _getId() not being implemented for the ParseFile class? Since _getId() is called here when saving unsaved children.

const identifier = obj.className + ':' + obj._getId();

Steps to reproduce

// a File object
const file : File;
const parseFile = new Parse.File('myFileName',  file);
const parseObject = new Parse.Object({ prop1: "hello", file: parseFile });
parseObject.save();

Actual Outcome

TypeError: object._getId is not a function. (In 'object._getId()', 'object._getId' is undefined)

Expected Outcome

No errors

Environment

Node.js v16.13.1

Server

  • Parse Server version: ^5.4.0
  • Operating system: Mac OS Monterey 12.5.1, Ubuntu 22.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local network served Node.JS

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 6.0.2
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Local network served

Client

  • Parse JS SDK version: 3.5.1

Logs

TypeError: object._getId is not a function. (In 'object._getId()', 'object._getId' is undefined)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions