-
-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding more than one object to PFRelation in PFObject subclass "Operation is invalid after previous operation." #911
Comments
Hey @meoz, thanks for the report! Let's look into this together:
Most likely what happens here is that you are trying to set the relation field to a Another solution that might help here is to not to use synthesized property for your relation, but rather organize it into something that looks like this: @interface PList : PFObject<PFSubclassing>
+ (NSString *)parseClassName;
@property (retain) NSString *name;
@property (nonatomic, strong, readonly) PFRelation *notes;
@end
//PList.m
@implementation PList
@dynamic name;
@dynamic notes;
+ (void)load {
[self registerSubclass];
}
+ (NSString *)parseClassName {
return @"PList";
}
- (PFRelation *)notes {
return [self relationForKey:@"notes"];
}
@end It would better describe your intention here, compared to mutable relation. Let me know if any of this helps. |
Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.
|
Hi @nlutsenko thanks for replying (sorry for the late reaction) For some reason it appears that after calling ' This is the method I wrote to add objects to the relation:
When I would add a second object, it'll crash on the following method in
Also doing this: will crash on the following method:
Stacktrace: I want to add that not synthesizing the property and doing this:
dit not help. Still crashing on the same locations. Thanks for any help on this. |
It seems the problem is not related to using subclasses or localDataStore. Apparently the problem occurs when a Unfortunately just using Here
Here
|
I started getting this error message after migrating to heroku. I am adding a single PFUser to the relation "blocked" off the User class. I even tried a save before the add just in case. oldValue is
|
Is this issue specific to parse-server? |
Well I am using the parse-server (2.2.9) in my heroku app, but I sense that it has more to do with the iOS SDK than the server component. |
@kokernutz Cool, thanks. I'm encountering this bug after switching to parse-server (2.2.7), also on Heroku. The relation code in our app that's causing the Has anyone encountered this using the iOS SDK with Parse.com? |
@nlutsenko, I have also encountered the same issue after migrating parse server(2.2.9) on Heroku. I was trying to add some objects to the
In the above code, I have a one to many relation between User and RatedImages and trying to add new ratedImage into relation of the current user. I have also tried to save the imagePFObject before adding into the PFRelation. Also, The above code is working fine with parse.com. |
Any update on this issue. We are observing the same and the migration to Parse Server is blocked due to this issue. |
I'm also having this issue trying to recreate it now |
Any updates on this issue? Anybody else observing the same? |
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback. |
@nlutsenko, I was trying to catch the actual issue and following are the details which I have found so far,
Please let me know in case you required further details from me. |
Tried upgrading parse-server to 2.2.11 and still have the problem. |
Upgraded to parse-server 2.2.12 and still have the problem. |
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback. |
Any update on this issue? |
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback. |
We upgraded to 2.2.14 and did not face this issue. |
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback. |
We are closing this issue due to another 7 days of inactivity. If you have additional information to help pinpoint this issue as an SDK bug, please reopen it with the additional information.Thank you for your feedback. |
//----------
Adding one 'note'-object goes without problems, I can see the object appearing on the dashboard. But when adding a second 'note' object an exception is thrown:
[NSException raise:NSInternalInconsistencyException format:@"Operation is invalid after previous operation."];
-> object in relation is not added
The text was updated successfully, but these errors were encountered: