当用户将文档上传到我的解析数据库时,我需要帮助设置我的if语句。现在,功能正常。但是我遇到了在一定条件下有2个对象的问题,所以现在当用户上传图像和字符串时,我需要删除旧的并保存新的。这是我的代码:
public class UserProfile {
// you could keep track of the UserTracks that belongs to a
//particular UserProfile in the Set.
// Now a UserProfile can belong to many UserTracks. Not just 2.
private Set<UserTrack> userTracks = new HashSet<>();
private int UserProfileId;
public int getUserProfileId() {
return UserProfileObjectId;
}
public void setUserProfileId(int userProfileId) {
UserProfileId = userProfileId;
}
}
所以在我需要删除旧对象的额外功能之前,我的postImage.saveInBackgroundWithBlock方法工作得很好,在我的查询中不再存在。我已经验证了正确的值是传递给self.userID和self.vaccineDocument的,并且在调试之后,我确实可以访问我需要的对象。我只是认为我的一些措辞在if object.objectId == nil声明中是错误的。非常感谢任何帮助!!
答案 0 :(得分:0)
我暂时找到了解决方法。我没有使用一个查询,而是使用了两个基本完成我的IF语句的不同的查询:
docker run -d --net=host
这是我想要的工作,只是我无法使alertController适用于删除案例。