-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mogenerator creates invalid files for an entity with no class #105
Comments
Instead of leaving Class field blank, try setting it to NSManagedObject (that's what Xcode's Data Modeler sets it to for new entities sans custom classes). |
When I said "blank" perhaps I was misstating. What I mean is that it's blank, ergo it takes the default value of NSManagedObject (that's what I see in the field). |
Hmm, that should work. mogenerator's Test Mule subproject has a an entity without a custom class just to test that (EntitySansCustomClass in https://github.com/rentzsch/mogenerator/tree/master/mogeneratorTestMule/mogeneratorTestMule_DataModel.xcdatamodel). Do you have the same problem with Test Mule's datamodel? |
Just had the same issue. When you delete the class from the Class field Xcode shows the grayish class name NSManagedObject.
Notice that it doesn't have a
Since |
…ty string) it should be considered to not have a custom subclass. Recent versions of Xcode use the empty string as default class for entities.
I have an entity that I do not want to generate a managed object subclass for so I leave Class blank.
I'd hoped that mogenerator would ignore this entity but, instead it generates files:
.h
.m
_.h
_.m
which I then have to delete. I suppose I could just create a class and ignore it but I'd really prefer either an option to exclude this entity or (preferably) for mogenerator to ignore entities with no class defined.
The text was updated successfully, but these errors were encountered: