-
Notifications
You must be signed in to change notification settings - Fork 394
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
Automatic generation for versioned data models #7
Comments
I'm just using mogenerator directly, and not the automatic generation with xmod. I wrote a script around mogenerator to grab the current model version. Here are the pertinent lines:
|
Yeah, I haven't implemented direct support for versioned models yet. Patches welcome :-) |
Here's a preliminary script that can be used as a build phase from amrox's script:
|
Looks like version 1.21 broke the ability to generate versioned data model. Here is an update to the workaround script. The script now correctly identify the versioned data model name as the output directory
|
Direct support added: #46 |
--- This pull request allows to put `xmod` tag on a versionned model *(.xcdatamodel**d**)* Script then will automatically detect current version and call `mogenerator` on it. This modification is non intrusive and not breaking existing behavior. This is a popular request related to several issues : rentzsch#7, rentzsch#14, rentzsch#37 Thanks to nvie who this is largely inspired from : nvie/mogenerator@575584320a03f8738f9e1c42f6e05f865f8aeb5a
--- This pull request allows to put `xmod` tag on a versionned model *(.xcdatamodel**d**)* Script then will automatically detect current version and call `mogenerator` on it. This modification is non intrusive and not breaking existing behavior. This is a popular request related to several issues : rentzsch#7, rentzsch#14, rentzsch#37 Thanks to nvie who this is largely inspired from : nvie/mogenerator@575584320a03f8738f9e1c42f6e05f865f8aeb5a
When you have added a version to your Core Data model (Design > Data Model > Add Model Version), automatic entity generation using the 'xmod' comment text stops working.
It's not exactly clear to me whether this should work, is still unimplemented, or whether the 'xmod' comment tag should be placed elsewhere (for example on the .xcdatamodeld directory?).
Any experiences with versioned models and auto-generating classes?
The text was updated successfully, but these errors were encountered: