Actually this is working for me now. I did have a bug in my original
migration policy, and at some point in my regression I changed
something which resulted in my migration policy class not getting
loaded by the application and didn't notice because the reported error
was the same.
Cheerio,
Michael Johnston
[email protected]
On 27-Jan-10, at 10:35 PM, Michael Johnston wrote:
Hi,
I'm having trouble implementing a NSEntityMigrationPolicy. Has
anyone used subclasses of NSEntityMigrationPolicy in macruby
successfully?
I've narrowed it down to the empty macruby implementation, which
looks like this:
{{{
class V3RecipeIngredientToIngredient < NSEntityMigrationPolicy
def createDestinationInstancesForSourceInstance(source,
entityMapping:mapping, manager:manager, error:error)
return true
end
def createRelationshipsForDestinationInstance(dInstance,
entityMapping:mapping, manager:manager, error:error)
true
end
end
}}}
when I run this (and do a addPersistentStoreWithType with
NSMigratePersistentStoresAutomaticallyOption) I get:
#<Class:0x10145fc80>: An error occured during persistent store
migration.
userInfo: {"NSUnderlyingException"=>#<_NSCoreDataException:
0x8002d8840>}
the _NSCoreDataException does not seem to have any message or other
chain of errors.
the corresponding Objective C empty implementation works fine:
{{{
- (BOOL)createDestinationInstancesForSourceInstance:
(NSManagedObject*)source
entityMapping:
(NSEntityMapping*)mapping
manager:
(NSMigrationManager*)manager
error:(NSError**)error
{
return YES;
}
}}}
Is there any way to get more detail on how/why it is failing?
Cheerio,
Michael Johnston
[email protected]
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel