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

Generating fetch from Xcode Model (Swift) #262

Closed
JoaoSobral opened this issue Dec 29, 2014 · 4 comments
Closed

Generating fetch from Xcode Model (Swift) #262

JoaoSobral opened this issue Dec 29, 2014 · 4 comments

Comments

@JoaoSobral
Copy link

Hi,

I noticed that the mogenerator is generating incorrectly the fetch code giving a compile build error. It is related with optionals. The fetches were created on the Xcode model.

From the fetch func this is what the mogenerator, generates, giving compile error:
let fetchRequest = model.fetchRequestFromTemplateWithName("FetchName", substitutionVariables: substitutionVariables
...
let results = managedObjectContext.executeFetchRequest(fetchRequest, error: &error)

However it should be generating (notice the unwrapping of model and fetchRequest)
let fetchRequest = model?.fetchRequestFromTemplateWithName("FetchName", substitutionVariables: substitutionVariables
...
let results = managedObjectContext.executeFetchRequest(fetchRequest!, error: &error)

Thanks for your support and dev on this generator!
Best regards,
Joao Goncalves

@TheMory
Copy link

TheMory commented Mar 13, 2015

Hi,

Same problem here. Is this issue has been corrected in a dev version ?

Thx a lot for providing this great tool.

Regards.

@modecolems
Copy link

Hi guys, no news about this issues ?

Cause mogenerator is just unusable while we have to manually alter generated files containing fetch request method on each build...

Thx for your help.

Regards.

@JoaoSobral
Copy link
Author

Agree on that :-(

On Mon, Apr 13, 2015 at 5:54 PM, modecolems notifications@github.com
wrote:

Hi guys, no news about this issues ?

Cause mogenerator is just unusable while we have to manually alter
generated files containing fetch request method on each build...

Thx for your help.

Regards.


Reply to this email directly or view it on GitHub
#262 (comment)
.

Cumprimentos,
João Gonçalves

@justin
Copy link
Collaborator

justin commented Dec 26, 2015

This is going to be fixed soon. We are tracking the changes in #302.

@justin justin closed this as completed Dec 26, 2015
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

4 participants