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

Xmod.scpt doesnt support versionned Models (a must for migrating models across versions) #14

Closed
puy0 opened this issue Feb 21, 2010 · 5 comments

Comments

@puy0
Copy link

puy0 commented Feb 21, 2010

Xmod script assume that model is in a /project/path/MODEL.xcdatamodel
Then it works on /project/path/MODEL node / folder

So iIt fails with versionned models which are in /project/path/MODEL.xcdatamodeld/MODEL.xcdatamodel
because trying to work on read only bundle path : /project/path/MODEL.xcdatamodeld/MODEL

I'm currently fixing that script so it work correctly on /project/path/MODEL whatever version is saved...
Too bad I'm an AppleScript noob ;)

Grea work on the generator btw, I'm loving it, would not consider using CoreData without.
Thanks a lot.

@puy0
Copy link
Author

puy0 commented Feb 21, 2010

UPDATE : looks like nvie already fixed that one : http://github.com/nvie/mogenerator/
testing it :)

@puy0
Copy link
Author

puy0 commented Feb 21, 2010

nvie script doesnt work for me or there is a trick to refer .xcdatamodeld as a file reference in project (it is a group for me)
anyway, now got a working script, but a bit dirty due to my AppleScript skills...
and thanks to nvie it even takes automatically the latest model version :)

@rentzsch
Copy link
Owner

rentzsch commented Jul 1, 2010

this should be working 1.18 now.

@puy0
Copy link
Author

puy0 commented Jul 1, 2010

great news, thanks for the update rentzsch, i'll check that in the coming days.
I could have provided my AppleScript, but it is so dirty i didn't dare.
I will bring feedback on that topic if needed.

@rentzsch
Copy link
Owner

See also #46

seanm pushed a commit to seanm/mogenerator that referenced this issue Jan 6, 2012
---

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
ddrccw pushed a commit to ddrccw/mogenerator that referenced this issue Jan 20, 2014
---

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 issue was closed.
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

No branches or pull requests

2 participants