Author Topic: Chapter 12 - Generating Entity Classes  (Read 4054 times)

shx

  • Newbie
  • *
  • Posts: 12
    • View Profile
Chapter 12 - Generating Entity Classes
« on: August 30, 2016, 11:50:46 AM »
When i generated the Entity classes the delivery status did not generate the way the book indicates. It generated

@NSManaged var deliveryStatus: NSManagedObject?

instead of

@NSManaged var deliveryStatus: DeliveryStatusEntity?

Can you help with this.

Steven

angelina

  • Global Moderator
  • *****
  • Posts: 25
    • View Profile
Re: Chapter 12 - Generating Entity Classes
« Reply #1 on: August 31, 2016, 12:01:58 AM »
Hi Steven,

This is most likely caused by the Class field being empty for the DeliverStatusEntity in the Data Model Inspector.  Make sure the Class is listed as “DeliverStatusEntity,” otherwise, it will use the default NSManagedObject, which is probably why you’re seeing that in the generated file.


Angelina
Oak Leaf Enterprises, Inc.