Search code examples
parse-platformparse-server

Encounter code 106 error, when parse class column name is changed


During development stage, sometimes I changed the column name of a parse class and my Query.find() is returning the following error

{"code":106,"message":"key objectId not present"}

The parse help says, I am tinkering with the internals of parse. Certainly no.... Is this a known issue? Do i need to clear the session or something like clear the schema cache?

Please help.


Solution

  • Changing a column name in a class on parse server is not (yet) available as of parse server 2.2.9.

    I assume you are changing its name directly in the mongoDB so it is clearly tinkering with the internals of parse server.

    However you could technically change a column name if you know which data to adapt, e.g. the _SCHEMA collection (only visible in the database, not in the dashboard) has to account for the new name as has the field name of every document in the collection.

    The easier way to do it is deleting the column you don't need and creating a new one with the desired name in parse dashboard. And maybe planning a bit further ahead so you don't have to change column names so often ;)