parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

fixed index creation on default field

Open mtrezza opened this issue 5 years ago • 0 comments
trafficstars

(1) This fixed a bug where index creation with the schema update endpoint was not possible for default fields, because the index field names were not transformed to their internal names, e.g. createdAt -> _created_at.

(2) However, this does not fix the issue that the schema still returns the internal index field names when being read. That means with this PR, a schema update request with index { createdAt: 1 } creates an index { _created_At: 1 } and the call also returns the index as { _created_At: 1 } instead of as { createdAt: 1 }. ~~This should probably be corrected as some point for consistency.~~ This needs to be corrected because the test is failing for Postgres otherwise.

  • [x] (1) transform index from non-internal name to internal name when creating
  • [ ] (2) transform index from internal name to non-internal name when retrieving the schema

closes https://github.com/parse-community/parse-server/issues/6834

mtrezza avatar Jul 28 '20 00:07 mtrezza