Alexander Theißen
Alexander Theißen

Reputation: 3889

XCode4 fails to generate NSManagedObject subclass properly

I created a model using the model Editor in XCode4. After a short while I decided to rename my entities.

That worked well but when I try to generate a NSManagedObject sublass from them, XCode generate them with the old entity/class name.

Is this a known bug?

Upvotes: 5

Views: 711

Answers (2)

Alexander Theißen
Alexander Theißen

Reputation: 3889

I solved it. This isn't a bug. If you click on the Entity you have to change the class name in the inspector, too.

Upvotes: 11

rbrown
rbrown

Reputation: 2635

Yes, this is a bug. I don't know if it has been reported yet, though. If not it should be. I have had the same problem. My solution, unfortunately, was to create a new model from scratch. Alternatively, you could try to modify the elements file in your .xcdatamodel file. However, this file is a proprietary format and is not guaranteed to work. You may create a bigger problem by trying to edit it.

Upvotes: 0

Related Questions