You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently had the desire to add a +findOrCreate type method to MyManagedObject "base class". In there, however, I wanted to make use of [self entityName]. Since +entityName isn't declared until later, this threw a compiler warning, of course.
For now, I can just do [(id)self performSelector:@selector(entityName)], but it got me thinking that it would be nice to either have template hooks in motemplates, so that I can use the built-in templates but #include custom code in each section, or to be able to specify whether my "base class" is the superclass of, or a subclass of the machine-generated _Model files.
What do you think about that?
The text was updated successfully, but these errors were encountered:
I recently had the desire to add a
+findOrCreate
type method to MyManagedObject "base class". In there, however, I wanted to make use of[self entityName]
. Since+entityName
isn't declared until later, this threw a compiler warning, of course.For now, I can just do
[(id)self performSelector:@selector(entityName)]
, but it got me thinking that it would be nice to either have template hooks in motemplates, so that I can use the built-in templates but #include custom code in each section, or to be able to specify whether my "base class" is the superclass of, or a subclass of the machine-generated _Model files.What do you think about that?
The text was updated successfully, but these errors were encountered: