support Relation object saving (#3074)
* support Parse.Relation object save * prevent Relation object from being saved in storage
This commit is contained in:
committed by
Florent Vilmart
parent
e9e6a4764e
commit
4ea455b20a
@@ -319,6 +319,9 @@ const parseObjectToMongoObjectForCreate = (className, restCreate, schema) => {
|
||||
restCreate = addLegacyACL(restCreate);
|
||||
let mongoCreate = {}
|
||||
for (let restKey in restCreate) {
|
||||
if (restCreate[restKey] && restCreate[restKey].__type === 'Relation') {
|
||||
continue;
|
||||
}
|
||||
let { key, value } = parseObjectKeyValueToMongoObjectKeyValue(
|
||||
restKey,
|
||||
restCreate[restKey],
|
||||
@@ -359,6 +362,9 @@ const transformUpdate = (className, restUpdate, parseFormatSchema) => {
|
||||
}
|
||||
}
|
||||
for (var restKey in restUpdate) {
|
||||
if (restUpdate[restKey] && restUpdate[restKey].__type === 'Relation') {
|
||||
continue;
|
||||
}
|
||||
var out = transformKeyValueForUpdate(className, restKey, restUpdate[restKey], parseFormatSchema);
|
||||
|
||||
// If the output value is an object with any $ keys, it's an
|
||||
|
||||
Reference in New Issue
Block a user