Closed
Description
Describe the solution you'd like
Currently parse server uses a string to set the schema type in mongo _SCHEMA, making it difficult to make additional settings such as required
If we use an Object, it will be easy to add an isRequired
option.
And I tried this and modified a few functions, the parse server can create objects, and schema,The rest is still unclear.
Bottom it's the schema of the GameObject
Function I edited
// MongoSchemaCollection.js
function mongoFieldToParseSchemaField(type) {
return type;
}
function parseFieldTypeToMongoFieldType(fieldType) {
return fieldType;
}
// MongoStorageAdapter.js
const mongoSchemaFromFieldsAndClassNameAndCLP=(/**/)=>{
const mongoObject = {
_id: className,
objectId: {type:'String'}, //objectId: 'string',
updatedAt: {type:'String'},
createdAt: {type:'String'},
_metadata: undefined,
};
}
Hope this is useful
Metadata
Metadata
Assignees
Labels
No labels