Core Data Mapping Model and empty filter predicates

2015-05-14 Thread Rick Mann
I've run into an issue that I haven't seen before with our mapping models: If the filter predicate was set, and is then cleared, migration complains about the empty filter predicate with: NSInvalidArgumentException: Unable to parse the format string I'm having to hand-edit the mapping

Updating Mapping Model after changing schema

2015-02-26 Thread Rick Mann
A problem I run into a lot with automatic migration using a Mapping Model is that I'm usually in the process of making incremental changes to my schema. So I create a Mapping Model, modify it as necessary, and things are fine. But then if I change the schema again, that Mapping Model

Re: Updating Mapping Model after changing schema

2015-02-26 Thread Rick Mann
Mann said: A problem I run into a lot with automatic migration using a Mapping Model is that I'm usually in the process of making incremental changes to my schema. So I create a Mapping Model, modify it as necessary, and things are fine. But then if I change the schema again, that Mapping

Re: Updating Mapping Model after changing schema

2015-02-26 Thread Sean McBride
On Thu, 26 Feb 2015 17:00:49 -0800, Rick Mann said: A problem I run into a lot with automatic migration using a Mapping Model is that I'm usually in the process of making incremental changes to my schema. So I create a Mapping Model, modify it as necessary, and things are fine. But then if I

Re: Updating Mapping Model after changing schema

2015-02-26 Thread Rick Mann
Oh, maybe. I'll try that next time (I already blew away and re-created the file). Thanks! On Feb 26, 2015, at 17:09 , Sean McBride s...@rogue-research.com wrote: On Thu, 26 Feb 2015 17:00:49 -0800, Rick Mann said: A problem I run into a lot with automatic migration using a Mapping Model

Re: Issue with Core Data Mapping Model

2013-01-23 Thread John Brayton
. I honestly don't know if I set these values or if Xcode did that for me. At any rate, setting the minimum count back to 1 seemed to make the mapping model recognized by Core Data. I hope this helps you. John On Jan 22, 2013, at 12:12 PM, Sean McBride s...@rogue-research.com wrote: On Thu

Re: Issue with Core Data Mapping Model

2013-01-22 Thread Sean McBride
On Thu, 17 Jan 2013 21:45:51 -0500, John Brayton said: I am building a mapping model between two versions of my Core Data model, and I am encountering a strange issue: * If I define six of the seven entity mappings I need in the mapping model, migrating the data works as expected. * When I add

Issue with Core Data Mapping Model

2013-01-17 Thread John Brayton
Hi, I am building a mapping model between two versions of my Core Data model, and I am encountering a strange issue: * If I define six of the seven entity mappings I need in the mapping model, migrating the data works as expected. * When I add the seventh entity mapping, the migration fails

Simple Value Expressions in a Core Data Mapping Model?

2013-01-04 Thread Jerry Krinock
I needed to create a Core Data Mapping Model today. The only value migration necessary was to negate a boolean. It seems like one should be able to enter such a simple expression into the Value Expression column of Attribute Mappings. Reading the Predicate Programming Guide, I tried, in turn

Re: Xcode 4 core data mapping model not creating inherited attributes/relationships

2011-08-08 Thread Sean McBride
On Sun, 7 Aug 2011 07:39:25 +0200, Martin Hewitson said: Is there a know problem or limitation in naming relationships? I haven't come across this anywhere before. Well, you should not name properties with the same name as an NSObject or NSMangedObject method name. ex: don't create a property

Re: Xcode 4 core data mapping model not creating inherited attributes/relationships

2011-08-08 Thread Martin Hewitson
On Aug 8, 2011, at 06:24 PM, Sean McBride wrote: On Sun, 7 Aug 2011 07:39:25 +0200, Martin Hewitson said: Is there a know problem or limitation in naming relationships? I haven't come across this anywhere before. Well, you should not name properties with the same name as an NSObject or

Re: Xcode 4 core data mapping model not creating inherited attributes/relationships

2011-08-06 Thread Martin Hewitson
(Cc'd cocoa mailing list because this turns out to be relevant to those working with core data.) This turns out to be much more sinister than I'd thought. The mapping model seems to be a red herring and the problem of having nil'ed out inherited attributes is not to do with the mapping model

Re: Mapping model

2011-01-15 Thread Matt Crocker
Hi Amy, It might be helpful if you could post an extract from your mapping method, or the whole thing if it's short. The last time I had a problem of this kind it turned out I had made a stupid error which only became obvious after I had left the problem for a week and then returned to it

Mapping model

2011-01-11 Thread Amy Heavey
I've got a data model that I want to add an attribute to (as in adding an attribute to an entity). The attribute is optional and can begin with a nil value. I've created a mapping model and it opens the old file, but I've got odd behaviour. The entity is called manufacturer and it has

Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
I'm getting an apparently spurious warning when compiling an mapping model (.xcmappingmodel) file: Foo.xcmappingmodel: warning: Relationship Mapping Starkoid_entityToStarkoid_entity.ixportLog -- NSMigrationManager method destinationInstancesForSourceRelationshipNamed:sourceInstances

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Quincey Morris
On Sep 7, 2010, at 11:26, Jerry Krinock wrote: 4. I cannot find the workaround mentioned in the warning in Core Data's 10.6 Release Notes. Does this describe and/or provide a solution for your problem?

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
is: They give you the code for the method and tell you to stitch it into the runtime. So I looked more closely at that mapping model. It has 19 entities and 9 to-one|to-many relationships. By that I mean it has 9 of these guys: - The auto-generated expression for migrating 8 of them

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Quincey Morris
of a sudden one relationship in one mapping model requires this new method. Didn't that document say that this scenario occurs when the entity has a sub-entity? I think, though I didn't keep track of the links, other results in the search that lead to this document said something about problems when

Patching implementation in +load. Was: … Mapping Model : Spurious Warning

2010-09-07 Thread Jerry Krinock
The workaround given in the note [1] works. But it recommends that you patch NSMigrationManager in a method that is guaranteed to be invoked before migration could be attempted—for example, if you have an application delegate, this could be in its init method Messy. I added a +load method to

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
On 2010 Sep 07, at 15:37, Quincey Morris wrote: Didn't that document say that this scenario occurs when the entity has a sub-entity … Ah, indeed this was my first subentity. You are correct as usual, Quincey – thank you! ___ Cocoa-dev mailing

Re: Patching implementation in +load. Was : …Mapping Model : Spurious Warning

2010-09-07 Thread Kyle Sluder
On Tue, Sep 7, 2010 at 3:41 PM, Jerry Krinock je...@ieee.org wrote: Messy.  I added a +load method to the NSMigrationManger category that I added, and invoked the patch in there.  Seems to work fine.  Is +load [2] not the recommended place to invoke patches? +load is kind of risky. See Bill

Re: Patching implementation in +load. Was : …Mapping Model : Spurious Warning

2010-09-07 Thread Kyle Sluder
On Tue, Sep 7, 2010 at 3:55 PM, Kyle Sluder kyle.slu...@gmail.com wrote: Since all you're doing is adding methods, +load might be an okay time to do things, except if the method you're replacing comes from a category. You might want to defer to +initialize instead. For the record, this is

Mapping Model

2010-08-23 Thread Amy Heavey
it over. I expect to initially set all quantites to 1, but I can't work out how to set up the mapping model so it moves the relationships correctly. Can anyone point me in the right direction? data model 1.0 Entities: Product, PurchaseOrder Relationships: Product

Re: Mapping Model

2010-08-23 Thread Keary Suska
to use the data already in the app I need to migrate it over. I expect to initially set all quantites to 1, but I can't work out how to set up the mapping model so it moves the relationships correctly. Can anyone point me in the right direction? data model 1.0 Entities