-
Notifications
You must be signed in to change notification settings - Fork 78
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
Save At Position #105
Comments
Hello. What do you mean by "first position"? Sorting? |
First we are getting array and that array sorted and i have stored inside coredata. but after that i am inserting new recored inside coredata. after that that record i am getting in last position but i would like to get that record at first position.. |
Are you inserting objects as a part of mapping or manually? |
mapping like
|
Are you talking about root object order or it is a relationship? |
Order |
I meant is it an order of the root object or an order of the relationship's object |
relationship object. |
In this case you should create your own assignment policy that will manage order in a way that you need. See Assignment Policy description. Also take a look at the implementation of the FEMAssignmentPolicyCollectionReplace to get an idea of how it works. |
Can you explain me how assignment policy works with replacing particular object??? |
Sorry, I was busy. Lets say that we're mapping a response for an object Therefore legend looks like this:
Here is the code with explanations:
Now going back to your question about how to alway prepend your objects in the beginning of the relationship: If this is not a replacement, then:
Few comments: this doesn't handle complex cases when target relationship value contains new and old values in a mixed order. Therefore values like this |
Hello,
Can we save Object at first location.
I would like store/insert object at first position is it possible??
thanks in advance.
The text was updated successfully, but these errors were encountered: