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

Wrong handling of variable expressions #92

Closed
ChristianKienle opened this issue Feb 18, 2012 · 2 comments
Closed

Wrong handling of variable expressions #92

ChristianKienle opened this issue Feb 18, 2012 · 2 comments

Comments

@ChristianKienle
Copy link

The current version of mogenerator (1.24) does not handle variable expressions in fetch requests correctly.

Description & steps in order to reproduce the issue:

  1. Download the sample model from http://dl.dropbox.com/u/29925418/mogeneratorissue.xcdatamodel.zip
  2. The model contains three entities and a few relationships:

World ---- countries ---->> Country ---- cities ---->> City

The entity "City" has an attribute named "testAttribute". In addition the model also contains a fetch request with a variable expression:

Fetch all "World" objects where:
Expression: countries.cities.testAttribute == $testExpression

  1. Run mogenerator on the model. mogenerator should crash.

Observations:

I have tried down to track down the issue myself - here is what I found out: The method

- (void)_processPredicate:(NSPredicate*)predicate_ bindings:(NSMutableArray*)bindings_

contains the code that handles a single predicate. This method calls _resolveKeyPathType where the crash occurs.

@ryanjm
Copy link

ryanjm commented Feb 18, 2012

I had this same problem.

@ChristianKienle thank you for figuring out the issue.

@rentzsch
Copy link
Owner

Dup of #15

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

No branches or pull requests

3 participants