Skip to content

Reserved Keywords such as such as "className" should not be allowed as column name. #7047

@tutorbear

Description

@tutorbear

Issue Description

Creating/adding a column with a reserved keyword such as "className" completely messes up the DB.

Steps to reproduce

  • Create a class.
  • Add a column with the name "className" (use any data type you want- String, number,etc)
  • Create a few objects and put values in the column
  • After a while do a refresh

Actual Outcome

A normal class with simple objects

Expected Outcome

  • You will see that all the objects that you created will become undefined
  • You cannot delete those objects anymore (You will get an error saying object not found)
  • It messes up other functionalities like save triggers for other classes as well
  • Even my console.log() stopped working at one point

Environment

Server

  • Parse Server version: 4.4.0

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 3.6

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