# Chapter 6: Error with complex mapping model

**URL:** <https://forums.kodeco.com/t/chapter-6-error-with-complex-mapping-model/107614>\
**Category:** Core Data by Tutorials\
**Created:** [May 1, 2020, 11:49pm UTC](https://forums.kodeco.com/t/chapter-6-error-with-complex-mapping-model/107614 "2020-05-01T23:49:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvantoor](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jvantoor/32/81494_2.png) [@jvantoor](https://forums.kodeco.com/u/jvantoor)\
**Post date:** [May 1, 2020, 11:49pm UTC](https://forums.kodeco.com/t/chapter-6-error-with-complex-mapping-model/107614/1 "2020-05-01T23:49:29Z")

</div>

Chapter 6 is giving me lots of headaches. I still didn’t figure out what’s wrong with my code when [performing the manual migration](https://forums.kodeco.com/t/chapter-6-error-when-performing-manual-migration/107509/2), so I decided to move on and use the provided V3 project as a starting point to continue with the chapter.

After implementing the complex mapping model I get an error:

Thread 1: Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134110 “An error occurred during persistent store migration.” UserInfo={NSUnderlyingException=Couldn’t create mapping policy for class named (UnCloudNotes.AttachmentToIimageAttachmentMigrationPolicyV3toV4)}

![Screen Shot 2020-05-01 at 6.43.18 PM](https://files.chunter.kodeco.com/original/3X/5/c/5c5aba1ca1bf6d1b6e2b45da2687404d30db7e10.png)

[UnCloudNotes.zip](https://forums.kodeco.com/uploads/short-url/zSYiWTaEqDuiQ3M664MyLPNi6GQ.zip) (124.4 KB)

I find the chapter very confusing. Some screenshots are missing and I noticed the instructions never mention to change Codegen to Manual/None too match the screenshots.

Perhaps this chapter needs a review?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 6, 2020, 12:32am UTC](https://forums.kodeco.com/t/chapter-6-error-with-complex-mapping-model/107614/2 "2020-07-06T00:32:20Z")

</div>

@jvantoor Please check out the update version of the book when you get a chance:

[https://store.raywenderlich.com/products/core-data-by-tutorials](https://store.raywenderlich.com/products/core-data-by-tutorials)

I hope it helps!

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [October 15, 2020, 3:49pm UTC](https://forums.kodeco.com/t/chapter-6-error-with-complex-mapping-model/107614/3 "2020-10-15T15:49:33Z")

</div>

Closed on October 15, 2020, 3:49pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
