I have been struggling with this for weeks. I am about to try your code @SpaceMan , but I am confused why the ChildItem has the item property as an optional. Surely every ChildItem should have a MainItem?
Also, I think that I understand 'final', but why are your Models public?
Post
Replies
Boosts
Views
Activity
Easy temporary fix - drag and paste the created file from Finder into the project.
Cancel my comment about the canvas - the default code puts the list in a NavigationView and reflected a Date() attribute the I had created in the PersistenceController - so all good.
I hit the same error immediately after starting a new project with CoreData, using the default generated code (Xcode 13.3.1) and adding a new View over a new, different Entity. I changed the default PersistenceController preview to reference the new Entity and the the crash disappeared. Two beers all around. However, I don't fully understand the relationship - now the new canvas View reflects the data from the default View and the simulator reflects no data - nuts! Let the elimination process begin, Watson!