mogeneratoris a command-line tool that, given an
.xcdatamodelfile, will generate two classes per entity. The first class,
_MyEntity, is intended solely for machine consumption and will be continuously overwritten to stay in sync with your data model. The second class,
_MyEntity, won’t ever be overwritten and is a great place to put your custom logic.