let match = Matches()
match.byUser = currentLoggedInUser
match.toUser = forUser
match.liked = true
let dataStore = backendless.data.of(Matches.ofClass())
// save object asynchronously
dataStore.save(
match,
response: { (result: AnyObject!) -> Void in
if let obj = result as? Matches {
//print("Contact has been saved: \(obj.objectId)")
}
},
error: { (fault: Fault!) -> Void in
print("fServer reported an error: \(fault)")
})
My App id is 5F3BA2F5-9BAA-E70F-FF7E-CDA02D820600
The log prints.
fServer reported an error: FAULT = ‘1001’ [Cannot update object without any properties: metadata] <Cannot update object without any properties: metadata>
The error logs are also very poor in your sdk. It should really give a pointer to what is failing. I see sometime Nullpointer exception etc.
My guess is it is failing at GeoPoint location since that is only with the metadata in the log but since there is no good doc on error, i might be wasting my time and thought to ask here.
When i log currentLoggedInUser . output is like this (note replaced location and url with some random letter)
toUser log is kinda similar
<BackendlessUser> {
Discovery = 1;
"__meta" = "{\"relationRemovalIds\":{},\"selectedProperties\":[\"gender\",\"___savedRelations\",\"about\",\"admin\",\"dpSmall\",\"ownerId\",\"password\",\"___class\",\"launchFirst\",\"objectId\",\"email\",\"locationLimit\",\"fname\",\"dpLarge\",\"created\",\"Discovery\",\"__meta\",\"lastnameTF\",\"nationality\",\"maxAge\",\"__relatedschemageopoint\",\"minAge\",\"name\",\"location\",\"interested\",\"updated\",\"age\"],\"relatedObjects\":{\"location\":[\"98384BEF-085D-3FEB-FF49-D3CDA02B1200\"]}}";
about = "I just Joined Modo";
admin = 0;
age = 18;
created = "2016-05-11 07:54:54 +0000";
dpLarge = "<BackendlessFile> -> fileURL: https://api.backendless.com/url.jpeg";
dpSmall = "<BackendlessFile> -> fileURL: https://api.backendless.com/5url.jpeg";
email = "indianfemale1@gmail.com";
fname = "Indian Femle 01";
gender = 2;
interested = 1;
lastLogin = "2016-05-11 07:56:22 +0000";
lastnameTF = 123;
launchFirst = 1;
location = {
"___class" = "com.backendless.geo.model.GeoPoint";
categories = (
Default
);
distance = 0;
latitude = "xx.613";
longitude = "xx.209";
metadata = {
};
objectId = "98384BEF-085D-3FEB-FF49-D3CDA02B1200";
};
locationLimit = 18;
maxAge = 18;
minAge = 18;
name = "indianfemale1@gmail.com";
nationality = Indian;
objectId = "D5670FBC-2FEE-20AB-FFF8-A63420934200";
ownerId = "D5670FBC-2FEE-20AB-FFF8-A63420934200";
updated = "2016-05-11 07:56:47 +0000";
userStatus = ENABLED;
}