Super Awesome Easy Fetching for Core Data 1!!!11!!!!1!

Clone this repo:
  1. 403eb48 Merge pull request #736 from xdream86/patch-1 by Tony Arnold · 9 years ago develop
  2. b1f5b0c Update Fetching.md by xdream86 · 9 years ago
  3. 23678ed Update implementation method order to match the header by Tony Arnold · 9 years ago
  4. c615ea4 Put kMagicalRecordDidMergeChangesFromiCloudNotification back where it's supposed to be by Tony Arnold · 9 years ago
  5. e00cc25 Make sample app log verbosely for demonstration purposes by Tony Arnold · 9 years ago

Awesome MagicalRecord

Build Status

In software engineering, the active record pattern is a design pattern found in software that stores its data in relational databases. It was named by Martin Fowler in his book Patterns of Enterprise Application Architecture. The interface to such an object would include functions such as Insert, Update, and Delete, plus properties that correspond more-or-less directly to the columns in the underlying database table.

Active record is an approach to accessing data in a database. A database table or view is wrapped into a class; thus an object instance is tied to a single row in the table. After creation of an object, a new row is added to the table upon save. Any object loaded gets its information from the database; when an object is updated, the corresponding row in the table is also updated. The wrapper class implements accessor methods or properties for each column in the table or view.

- Wikipedia

MagicalRecord was inspired by the ease of Ruby on Rails' Active Record fetching. The goals of this code are:

  • Clean up my Core Data related code
  • Allow for clear, simple, one-line fetches
  • Still allow the modification of the NSFetchRequest when request optimizations are needed

Documentation