Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add dynamic find methods #11

casademora opened this Issue · 2 comments

3 participants


Like Rails' Active record, dynamic find methods should be created and attached to an NSManagedObject subclass to dynamically attach custom find methods. For example, a Person entity with a name attribute should have a dynamic method, or set of methods like:

Person.findByName(@"John Smith")

Rails has other variations on this that could be helpful, and valid


Is there any way to do this without getting tons of warnings? It doesn't seem like something that maps well to objective-c.


Honestly, I don't know. But, Core Data itself does the same thing. That's how you get the primitive accessors...and, you do have to do one of two things to resolve the warnings:

  1. define them yourself
  2. use mogenerator to automatically generate them

I prefer option 2., and part of this ticket will probably be to add a template that can be installed for mogenerator :)

@casademora casademora was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.