unignore .xcworkspace, ignore xccheckout and xcodebuild logs
Ignore xclisten logs
treat nsnull values as nil
s/mneorr/supermarin
Support conditions with +[NSManagedObject find:]

It uses +[NSManagedObject where:] under the hood anyway, so no reason to
not support predicates, etc.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Add +[NSManagedObject findWithFormat:]

Now that we support +[NSManagedObject find:] with conditions, we can
create this nice format-based helper.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Use +[NSPredicate predicateWithFormat:] instead

Using stringWithFormat: is problematic for strings that are passed in
that break out of the quotes.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Support va_list in where:, find:, and countWhere:

This removes support for whereFormat: and findWithFormat: in the
process, so upgrade your calls!

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Update CHANGELOG

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Update new format
Update README.md
Chained fetch request builder (ObjectiveRelation)

This commit provides to ObjectiveRecord what Arel[1] provided to Active
Record.

[1]: https://github.com/rails/arel

It simplifies the interface by using a chained request builder. Instead
of:

  [Person where:@{@"firstName": @"Stephen"} order:@"lastName" limit:@5];

We can use:

  [[[Person where:@"firstName = %@", @"Stephen"] order:@"lastName"] limit:5];

Because of chaining, we can remove most of the methods that build
complex fetch requests all at once, and we can support features that
were previously omitted, like offset (perhaps due to the number of
method signature permutations required to make them work).

Even +countWhere: can be removed:

  [[Person where:@"firstName = %@", @"Stephen"] count];

Each step in the chain returns a lazy-loading fetch request. So you can
store a base request and build on it in different ways. E.g.,

  // Create 2 people in a private context
  id privatePeople = [Person inContext:privateContext];
  [privatePeople create:@{@"firstName": @"Marin"}];
  [privatePeople create:@{@"firstName": @"Stephen"}];

  // Pagination
  id page = [Person limit: 5];
  // ...
  page = [page offset:[page offset] + [page limit]];

A fetch request is not executed before you ask for data that would
require a fetch, e.g. by iterating, fetching a specific result, or a
count.

Fetch request builders conform to NSFastEnumeration and forward array
selectors to the result set, so act on them as you would act on the
final NSArray:

  for (Person *person in [Person all]) {
    // ...
  }

  [[Person where:@"admin = NO"] setValue:@YES forKey:@"admin"];

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Add updateAll:

Quickly allows records to be updated via scope.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Reorganize ActiveRecord/Relation methods

Organize by:

 - Building fetch requests
 - Executing fetch requests
 - Inserting entities
 - Modifying entities
 - Deleting entities

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Expose .limit and .offset on ObjectiveRelation

Good for public introspection (for, e.g., pagination).

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Support old NSManagedObject methods (via deprecation)

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Add LICENSE to individual files

Also add LICENSE information to the README (and update the LICENSE
file).

Should make things friendlier for those that care.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Use __deprecated consistently

It's shorter, so let's prefer it.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Better KVC support for `update:`

If we use setPrimitiveValue:forKey:, and wrap the block that assigns
everything with calls to willChangeValueForKey: and
didChangeValueForKey:, we can ensure that observers are acting on the
full dataset at once.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Move date formatter to its one concern

No need for the method wrapper when we're only calling it in one place.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>