Skip to content
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

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

Closed
tutorbear opened this issue Dec 6, 2020 · 2 comments · Fixed by #7053
Closed
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@tutorbear
Copy link

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
@mtrezza
Copy link
Member

mtrezza commented Dec 6, 2020

Thanks for reporting.

That's a nice catch. Would you be willing to create a PR with a failing test case so we can confirm that this is a bug?

@sunshineo
Copy link
Contributor

+1 for length

@mtrezza mtrezza added type:bug Impaired feature or lacking behavior that is likely assumed S3 and removed needs more info labels Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants