I've got a few questions I've been trying to answer for myself (by hunting through the documentation) but I have a feeling I'm missing something.

Any hints (and/or pointers to appropriate documentation) would be much appreciated.

I'm building a Core Data document-based application. There are essentially two entities:

There is a single "Comparison" record associated with each document.
 There are potentially many "Node" records associated with each document.

My first question is whether I'm thinking about this correctly. Since there is only a single Comparison object for each document, the attributes of the Comparison are essentially attributes of the Document itself. What (if any) is the preferred way of modeling that?

If a Comparison entity is in fact the right way to go, my next question is how and when to actually instantiate the (single) Comparison object. The user should not have to explicitly "add" the Comparison since there's going to be only one of them associated with the Document. Instead, a single Comparison object should be instantiated and inserted into the managedObjectContext. I've got something like this working already, with code in MyDocument.m that looks like this:

* (void)windowControllerDidLoadNib:(NSWindowController \*)windowController {
[super windowControllerDidLoadNib:windowController];
[NSEntityDescription insertNewObjectForEntityForName:@"Comparison" inManagedObjectContext:managedObjectContext];
}

However -- if the user creates a new document but then never does any work with it -- for example if he immediately clicks the close button -- then he should not be asked to "Save" the document. He should be asked to save his work only if he's actually entered any information. Is there a preferred way to implement this behavior?