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

failed assertion 'relationship': fetch requests with substitution variables #15

Closed
lawrencelomax opened this issue Mar 7, 2010 · 11 comments
Labels

Comments

@lawrencelomax
Copy link

Hi,

I'm having an issue with using fetch requests causing mogenerator to present the following error:
mogenerator -m ./Resources/DataModel.xcdatamodel/ -O ./Classes/Managed\ Objects/
/Users/wolf/code/github/mogenerator/mogenerator.m:80: failed assertion `relationship'
Abort trap

This seems to come down to creating a fetch request that uses substitution variables in combination with a request that gets the LHS from a relationship. So this causes mogenerator to fail: user.username == $username, wheras this does not requestIdentifier == $request_identifier. I'm not too good at explaining technical details so I have uploaded a screencast so you can see what I am on about. The screencast is available here: files.me.com/insertjokehere/qa9jg7.mov

@zdima
Copy link

zdima commented Jun 6, 2010

This issue is a stopper for me.
It is very common to have fetch request with variables in the model.

@rentzsch
Copy link
Owner

rentzsch commented Jul 1, 2010

@zdima
Copy link

zdima commented Jul 1, 2010

Jonathan
In my case it is still failing. I just download latest version (1.18) and create simple model with 2 tables:
$ mogenerator --version
mogenerator 1.18. By Jonathan 'Wolf' Rentzsch + friends.
$ mogenerator -m DATA.xcdatamodel -M machine -H myclasses
/Users/wolf/code/github/mogenerator/mogenerator.m:137: failed assertion `relationship'
Abort trap

The tar file with model can be download from: http://www.zdima.net/downloads/model.tar

Let me know if there is something in the data model that I am not suppose to do, otherwise the issue seems to be exist.

Thanks

@rentzsch
Copy link
Owner

rentzsch commented Jul 2, 2010

Ah, thanks for the data. Yeah, that's a known TODO:
https://github.com/rentzsch/mogenerator/blob/master/mogenerator.m#L163

I don't need this feature yet, do want to tackle implementing it?

@rentzsch
Copy link
Owner

Looks like duplicated as #81

@rentzsch
Copy link
Owner

Duplicated as #124

@rentzsch
Copy link
Owner

#33 asks for better error reporting

@rentzsch
Copy link
Owner

Dup'd as #139

@rentzsch
Copy link
Owner

Dup'd as #81

@rentzsch
Copy link
Owner

Dup'd as #114

@rentzsch
Copy link
Owner

Dup'd as #92

ddrccw pushed a commit to ddrccw/mogenerator that referenced this issue Jan 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants