Rewrite all relationships in Core Data with “constraint”Core Data: Quickest way to delete all instances of an entityPassing Data between View ControllersHow to Test Core Data Migration With an App Already in the App Store?Replace entities in to-many relationship in Core DataHow do I animate constraint changes?Core Data subentity vs. relationship for entities with similar attributesiCloud using core data : Facing difficulty to fetch and show old data of live application in current development applicationSetting relationships in core data swift after context savedCore Data Relationship For Unidirectional One to ManyCore Data fetch with Predicate of transient relationship!= nil
What's the purpose of "true" in bash "if sudo true; then"
Is there a problem with hiding "forgot password" until it's needed?
How can a jailer prevent the Forge Cleric's Artisan's Blessing from being used?
Will it be accepted, if there is no ''Main Character" stereotype?
How can I get through very long and very dry, but also very useful technical documents when learing a new tool?
Hostile work environment after whistle-blowing on coworker and our boss. What do I do?
Is a roofing delivery truck likely to crack my driveway slab?
apt-get update is failing in debian
Go Pregnant or Go Home
Opposite of a diet
Is exact Kanji stroke length important?
Curses work by shouting - How to avoid collateral damage?
Modify casing of marked letters
How to verify if g is a generator for p?
Are there any thematic similarities between Shostakovichs' Symphony 5th and Beethovens' 7th symphony?
How will losing mobility of one hand affect my career as a programmer?
What's a natural way to say that someone works somewhere (for a job)?
If a character can use a +X magic weapon as a spellcasting focus, does it add the bonus to spell attacks or spell save DCs?
Why is delta-v is the most useful quantity for planning space travel?
How can I replace every global instance of "x[2]" with "x_2"
Was the picture area of a CRT a parallelogram (instead of a true rectangle)?
Select empty space and change color in vector
How do I rename a LINUX host without needing to reboot for the rename to take effect?
How can I use the arrow sign in my bash prompt?
Rewrite all relationships in Core Data with “constraint”
Core Data: Quickest way to delete all instances of an entityPassing Data between View ControllersHow to Test Core Data Migration With an App Already in the App Store?Replace entities in to-many relationship in Core DataHow do I animate constraint changes?Core Data subentity vs. relationship for entities with similar attributesiCloud using core data : Facing difficulty to fetch and show old data of live application in current development applicationSetting relationships in core data swift after context savedCore Data Relationship For Unidirectional One to ManyCore Data fetch with Predicate of transient relationship!= nil
I have "Product" entity with "PrimaryOption" relationship array inside it.
I need to rewrite products with same "id" field.
To do this, I added a constraint for the "Product" entity and set
mergePolicy to NSMergeByPropertyObjectTrumpMergePolicy
The product is overwritten successfully, but if i add another primary option on the server, it will not overwrite the existing options in the product, but add to them.
Because of this, the core data begins to accumulate old options in product that may no longer be on the server.
How do I rewrite the product in full along with all the relationships?


ios swift core-data core-data-migration
add a comment |
I have "Product" entity with "PrimaryOption" relationship array inside it.
I need to rewrite products with same "id" field.
To do this, I added a constraint for the "Product" entity and set
mergePolicy to NSMergeByPropertyObjectTrumpMergePolicy
The product is overwritten successfully, but if i add another primary option on the server, it will not overwrite the existing options in the product, but add to them.
Because of this, the core data begins to accumulate old options in product that may no longer be on the server.
How do I rewrite the product in full along with all the relationships?


ios swift core-data core-data-migration
add a comment |
I have "Product" entity with "PrimaryOption" relationship array inside it.
I need to rewrite products with same "id" field.
To do this, I added a constraint for the "Product" entity and set
mergePolicy to NSMergeByPropertyObjectTrumpMergePolicy
The product is overwritten successfully, but if i add another primary option on the server, it will not overwrite the existing options in the product, but add to them.
Because of this, the core data begins to accumulate old options in product that may no longer be on the server.
How do I rewrite the product in full along with all the relationships?


ios swift core-data core-data-migration
I have "Product" entity with "PrimaryOption" relationship array inside it.
I need to rewrite products with same "id" field.
To do this, I added a constraint for the "Product" entity and set
mergePolicy to NSMergeByPropertyObjectTrumpMergePolicy
The product is overwritten successfully, but if i add another primary option on the server, it will not overwrite the existing options in the product, but add to them.
Because of this, the core data begins to accumulate old options in product that may no longer be on the server.
How do I rewrite the product in full along with all the relationships?


ios swift core-data core-data-migration
ios swift core-data core-data-migration
edited Mar 21 at 15:26
DimonDeveloper
asked Mar 21 at 15:05
DimonDeveloperDimonDeveloper
77112
77112
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55283500%2frewrite-all-relationships-in-core-data-with-constraint%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55283500%2frewrite-all-relationships-in-core-data-with-constraint%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown