Skip to content
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

Fix swift entity names #222

Closed
wants to merge 2 commits into from

Conversation

tonyarnold
Copy link
Contributor

Currently it is necessary to set the class name of an entity in your data model to the fully qualified Swift classname, plus its parent module, i.e. "MyThingKit.Account". This PR updates mogenerator to any modules from the front of the class name returned from - [NSEntityDescription managedObjectClassName] so that it just becomes "Account" in generated Swift output.

There might be a nicer way to come at this, and using pathExtension to achieve the module stripping isn't semantically great — but it works OK.

I'm happy to update this PR based on any feedback.

This PR also includes the contents of #221. Feel free to merge it first, or this one in it's entirety — they both came from the same branch so it should be a clean merge.

@justin
Copy link
Collaborator

justin commented Apr 26, 2015

It's a year later. These still relevant?

@justin
Copy link
Collaborator

justin commented Dec 26, 2015

Guess not. Closing it out.

@justin justin closed this Dec 26, 2015
@tonyarnold
Copy link
Contributor Author

Yeah, sorry dude — no idea. I haven't done much Core Data in the last 12 months. I think it might be necessary, but ¯\_(ツ)_/¯ until someone has trouble 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants