Browse files

Update to reflect recent changes, especially the MR_SHORTHA…

…ND macro
  • Loading branch information...
1 parent 5452a29 commit feffba86e7ee591436a9d7ec4d718ccc73bca626 @tonyxiao tonyxiao committed Dec 29, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2
@@ -16,7 +16,8 @@ Magical Record for Core Data was inspired by the ease of Ruby on Rails' Active R
1. In your XCode Project, add all the .h and .m files from the *Source* folder into your project.
2. Add *CoreData+MagicalRecord.h* file to your PCH file or your AppDelegate file.
-3. Start writing code! ... There is no step 3!
+ * Optionally add `#define MR_SHORTHAND` to your PCH file if you want to use shorthand like `findAll` instead of `MR_findAll`
+4. Start writing code! ... There is no step 3!
# ARC Support
@@ -71,9 +72,11 @@ Magical Record also has a helper method to hold on to a Managed Object Context i
Most methods in MagicalRecord return an NSArray of results. So, if you have an Entity called Person, related to a Department (as seen in various Apple Core Data documentation), to get all the Person entities from your Persistent Store:
+ //In order for this to work you need to add "#define MR_SHORTHAND" to your PCH file
NSArray *people = [Person findAll];
+ // Otherwise you can use the longer, namespaced version
+ NSArray *people = [Person MR_findAll];
Or, to have the results sorted by a property:

0 comments on commit feffba8

Please sign in to comment.