-
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
Versioned model doesn't work with only one version #137
Comments
Thanks for the bug report. I like your solution, can I sweet-talk you into writing it? |
Hah! Yeah, I'd be happy to take a stab at a patch, but I won't have time until the weekend at the earliest. Wanted to get the issue in before I lost the plot entirely. On Nov 19, 2012, at 5:59 PM, rentzsch [email protected] wrote:
|
Sweet. Even better! Thanks, @Sagran! |
No problem. Actually ran into this, fixed it, and was surprised to find somebody else had run into this an hour before I did. :D On Nov 19, 2012, at 20:25, Sixten Otto [email protected] wrote:
|
Is there an official release with this code merged in? |
Support was added in #102 and released in version 1.27 for passing a versioned model directory as the
--model
argument to mogenerator. It appears to miss one edge case: it's possible for a newly-created versioned model (with exactly one model version inside of it) to lack a.xccurrentversion
file.In Xcode 4.5.2, at least, new models are created in that state. And while the File Inspector does display a menu to select the current model version, selecting the one option available does not cause it to create the marker file.
I'd suggest perhaps that in the case where a versioned model is specified, and the current version file does not exist, that mogenerator count the number of
*.xcdatamodel
items are in that directory. If there's exactly one, then the choice is pretty clear. If there are more (or zero), then execution should halt as it does now.The text was updated successfully, but these errors were encountered: