rentzsch/mogenerator — pull request #129 by bgulanowski (2012-09-26 17:34:24+00:00)
Title: Various enhancements for general and personal use

These changes combine a few different features. I've included my own templates (the zeroth feature) to support them, along with a few changes that alter the way type names are emitted. Probably you won't want those.

You may also not want one feature that I added just for myself. It depends on a custom class (available if requested) used to wrap a CFUUID. It creates a one-way relationship using standardized attribute names ("uuid" on the destination, and "UUID" on the source). The additional code and template support automatically generate a custom accessor which wraps a generated fetch request using the UUID attribute on the source to match to the "uuid" attribute on the destination.

Somewhat similarly, custom fetched properties often only return one result (by design). As such, I have added support for a fetched property userInfo dictionary key with the name of the single result. The template generates a convenience method which returns the one result after removing from the array result generated by the fetched property.

Thirdly, I have cleaned up the generation of class declarations to prevent duplicates and arrange them in alphabetical order.

Feel free to cherry pick these changes as desired.