Ok, I seemed to have an answer…in the book it says
Note: Make sure you change this code generation setting before your first compilation after you add the Bowtie entity to the model.
If you set the code generation setting after your first compilation, you’ll have two versions of the managed object subclass: one in derived data and a second one in your source code. If this happens, you’ll run into problems when you try to compile again.
But in the book it doesn’t tell you how to fix this if you do run into problems. What I can upon is to find <home>/Library/Developer/Xcode/DerivedData/Bow_Ties.... and delete the folder. Then it builds cleanly.