parse-community / parse-community/parse-server

Allow editing createdAt in cloud code

Open
#9,889 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:docs
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

Current Limitation

Saving a Parse Object fails if I try to edit or set the createdAt attribute, the Readme mentions that the maintenanceKey lets you edit these attributes but there is no docs about that or the maintenanceKey in general

Feature / Enhancement Description

Add a "useMaintenanceKey" attribute in Parse.Object.save / saveAll that allows editing createdAt and possibly updatedAt

Example Use Case

Many apps use the createdAt field in their UI and Parse Queries and when you accidentally delete an Object and need to restore it or when you need to import data from exports (ie. importing a user's history from a competitor app) there is no way for you to set the createdAt prop

Alternatives / Workarounds

Using mongodb directly but it is highly impractical and requires implementing a complete MongoDB client and new functions that won't even be able to trigger Parse Hooks and so on...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Parse.Object.save and saveAll entry points named in the issue, then trace how the maintenanceKey is currently handled. The work is done when createdAt can be edited through the requested option, the behavior for updatedAt is resolved, and the maintenanceKey behavior is documented in the relevant README or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api, backend, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.