[COMPASS-3473] When inserting a document, changing field from Object to int32 generates an error Created: 28/Feb/19  Updated: 05/Mar/19  Resolved: 05/Mar/19

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: 1.16.4
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jonathan Fanti Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS 10.14.3


Issue Links:
Duplicate
duplicates COMPASS-3246 Insert not permitted while document c... Open
duplicates COMPASS-3251 Insert still not permitted after a fi... Closed

 Description   

Creating a new document and adding an empty field with type "Object" then trying to change it to an int32 generates an error "Insert not permitted while document contains error". It looks as though Compass is adding the string value "int32" is added to the field, and so the value is not valid for an int32 data type.

Work around: Change the field type to string, insert an integer value and then change to type int32. You can now save the document.

To reproduce:

  • Insert a new document into a collection.
  • Create a new field , e.g. "a" and select type as "Object", do not insert any value.
  • Change the field type to "int32".
  • Error is generated.

Screen grab of issue: https://cl.ly/7031932a2a81/Screen%252520Recording%2525202019-02-28%252520at%25252014.38.gif


Generated at Wed Feb 07 22:33:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.