title: NSManagedObjectModel initWithContentsOfURL returns nil eventhough the modelURL is valid
body: <p>my NSManagedObjectModel is returning nil eventhough the path is correct.</p>
  
  <pre><code>        NSString *modelKey = [NSString stringWithFormat:@"/%@/Model", name];
      NSString *modelPath = [((Configuration *)[Configuration shared]) stringEntry:modelKey];
      NSURL *modelURL = nil;
      if ( ! [modelPath contains:@"://"] ) {
          modelPath = PathForBundleResource( modelPath );
          modelURL = [NSURL fileURLWithPath:modelPath];
      }
      NSManagedObjectModel *m = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
  </code></pre>
  
  <p>NSString *PathForBundleResource(NSString *relativePath) </p>
  
  <pre><code>    NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
  return [resourcePath stringByAppendingPathComponent:relativePath];
  </code></pre>
  
  <p>I've reset the simulator, did a clean build but nothing helped. </p>
  
  <p>I'm new to iPhone programming (core data in particular). </p>
  
  <p>Would appreciate any help.</p>
  
  <p>Edit: I've edited the original post regarding the xcdatamodeld file. It wasn't linked up properly initially but now it is and still having the same problem.</p>
  
  <p>Edit 2: Apparently the name of the xcdatamodel had some variations to the name of the xcdatamodel after linkage. It's working now. Feeling so stupid. Don't know how to delete this question.</p>