On 28/11/2007, at 1:33 PM, Chuck Hill wrote:
I don't think you should _need_ to do this as long as the bundles are correctly formed and on the classpath as they would be at app runtime.
Presumably I'm failing at either or both of these. :-)
I don't have this in my tests and I am using EOF. What I do have is the usual prototype switching and connection dictionary changing code.
I don't have anything like that. This is all I've done, adapted from Sam's code, and it's in '@Before public void before()':
try {
EOModel model = new EOModel(new File("Resources/Auth.eomodeld")
.toURI().toURL());
EOModelGroup.defaultGroup().addModel(model);
} catch (MalformedURLException e) {
throw new RuntimeException("Couldn't load EOModel", e);
}
Interestingly (to me, anyway), I use prototypes in the Auth model, yet I don't need to add my Prototypes model in the manner above.
You may need to do something like this to jump start things:
NSBundle.allBundles();
EOModelGroup.defaultGroup();
I commented out the addModel() code above, and tried this, but I was still "unabled" to find an EOClassDescription. :-) This all seems a bit harder than it should be, but I've got my trivial test case running now, so I'm happy to press on.
Thanks to all who replied.