Skip to content

customObjectId does not work with beforeSave triggers #6733

Open
@buitanloc

Description

@buitanloc

Issue Description

  • customObjectId does not work with beforeSave triggers.

Steps to reproduce

  • Turn on flag allowCustomObjectId on ParseServer
  • Try to create a GameScore object with customObjectId objectId1 (from Android or iOS)
  • Back to ParseServer, add beforeSave trigger for GameScore with empty body / function.
  • Try to create the second GameScore object with customObjectId objectId2 (from Android or iOS)

Expected Results

  • Received 2: GameScore objects with customObjectId: objectId1, objectId2.

Actual Outcome

  • The first object has objectId is objectId1 while the second object has random id like this sMTH8Sq6jl

Environment Setup

  • Server

    • parse-server version: 4.2.0
    • Operating System: N/A
    • Hardware: N/A
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): The problem happens on both localhost and Heroku
  • Database

    • MongoDB version: 4.2.7
    • Storage engine: N/A
    • Hardware: N/A
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): The problem happens on both localhost and mLab

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