Core Data and migration question.

Lets say software v1.0 uses the core data model version coreDataModelA.xcdatamodel ...
Software v2.0 uses core data model version coreDataModelB.xcdatamodel...
and Software v3.0 uses core data model version coreDataModelC.xcdatamodel.
Assuming migrations were done from coreDataModelA.xcdatamodel to coreDataModelB.xcdatamodel and then to coreDataModelC.xcdatamodel, if a user is upgrading from software version 1.0 to software version 3.0 (skipping 2.0).... will it successfully migrate for them?
I'm assuming an app has only one xcmappingmodel file.

Does this help?

Similar Messages

  • Core data and predicate on large volume

    Hi,
    In one of my current project requirement is to view product information in perticular date range.
    Input
    No. Of products  :- P1 P2 P3 P4 P5
    No of channels....:-  C1 C2 C3 C4
    No of regions     :- R1 R2 R3 R4
    Depending on any of the above combination user can select either "Daily" "Weekly" "Monthly" "Yearly"
    for daily for Perticular date there will be (5 produtcts *4 channel*4 regions)= 80 Combinations
    Daily :-so for 5 years it will be (80*365*5=1,46, 000) records
    Montly:- for monthly for 5 years :- 12 *5 = 60 so total 4800 records.
    quarterly for quarterly for 5 years :- 4 *5 = 20 so total (20*80) =1600 records.
    That means we can calculate all daliy monthly , quarterly and yerly using daily data.
    As user can varies the selected combination of product , channels and regions and can also slect the date range.
    Looking at the search criteria , we decided to load the data into core data and then use predicate to fetch teh data.
    Calculation formula:-
    Day :- On perticular date
    Weekly :- On friday i.e. end of week
    Monthly :- 31/30 month end date
    Quarterly :- March end date , Jun end date etc.
    Yearly 31st dec date
    But my questoion is ,
    1.Can we  use Daily model to fetch also monthly , quaterly and yearly information. Memory optimization good vs response time less
    2. Sepaarte data model for Daily , Monthly and quarterly . Yearly we can calculate from quarterly . [Response time good but duplicate data]
    Could anyone plesae suggest which is the best option to model this data ?

    Does this help?

  • Core Data and Postgres merger?

    Hello!
    Is there some public info or "big picture" available how to or where to hook myself into the object and message chain of Core Data and to generate SQL to CRUD (Create, Read, Update, Delete) rows of data with postgres instead of SQL Lite or flat-files that Core Data natively supports?
    I also like the ActiveRecords way of doing things in Ruby and an Objective-C class, that models a table and objects model single rows, doesnt seem too overtly complicate to implement, but how to bind this then effectively with Core Data? So that we could use CoreData models nicely in IB and use the available binding methods.
    Thanks for any input,
    regards
    Philipp
    Intel iMac   Mac OS X (10.4.6)  

    Does this help?

  • New Mac Pro and migration question

    I will be getting a new Mac Pro in a day or so. I currently have a G4 with all the Adobe suite programs and more. I am wondering if it is best to install those fresh. It sure would help to get all my Dreamweaver settings as I have a ton of sites.
    Should I just transfer mail and prefs etc.

    There are many pros and cons to doing such a thing. The biggest pro to doing so is expediency. Manual transitions, while more efficient, can be quite a pain even when you know what goes where. When this works it works great.
    However, there are downsides to it. Firstly, being a new system the best way to gauge it's performance is to have everything fresh and new. While it's more effort you do get a much better feel for what you system can do and a much better awareness of when things are wrong.
    Then there's the migration itself. With a data only migration I can't see much going wrong but there are instances when a migration does affect total system performance.
    So I guess I've not really answered your question. There are benefits to opting both ways.

  • Keeping backups of application data and migrations to new ipod?

    I'm planning to share an iPod Touch with my younger brother since I so rarely use it so I'm barely familiar with basic usage. I want him to have his own account separate from mine, but I would like to be able to backup his data and restore my data when the time comes. The iPod should either only have his data or mine, but obviously not both. I might even buy myself a new ipod touch or migrate to an iPhone.
    So the question is:
    a) Does backups take backup of application data such as save games and application settings?
    b) Can I restore all the applications, app data, game saves, music and video to another ipod touch/iphone in the future? i.e. migrate to another device?
    c) How do I backup the backup? i.e. if I keep this backup on my PC (Windows) and need to wipe the computer clean and re-install Windows. How do I retain the iTunes backup data?
    d) How do I perform the backup? Yeah, I literally used the iTunes application a dusin times at most, so have little clue how to operate it.
    Please help, since I'm not familiar with my own iPod Touch!

    this will answer most (if not all) your questions: About Backups.
    also check out iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • Problem with core data and attribute name "description"

    I have spent hours tying to figure out this problem.
    It appears that is you name an attribute "description", there can be problems at run-time.
    Perhaps, it is related to how I am doing things and letting interface builder do all the bindings.
    I create a core data application in Xcode.
    I create the entity with some attributes in Xcode and then I launch interface builder. I drag a "core data entity" object to the application window. I add a "Master/Detail View".
    I save the files and do a compile. When I click on the "add" button, something goes wrong and GDB launches and loads the stack frame into the debugger.
    I am using Xcode 3.1.2.

    description is the name of a method in the NSObject protocol; try to use another name for your attribute in CoreData, for example myDescription.

  • Core data and Populate field programmatic

    Hi
    On a window i have a couple of controls Combo box, Text field and a few buttons
    all linked to core data which is working perfect ish
    if I select the combo box and change the value its updated in core data straight away
    if I press a button it put a value in the text box but doesn't update the code data field until i click in the field and add a space or something simular ..
    is it a focus thing, the field don't lose focus until I have done it manually
    can someone point me in the right direction for this
    just want to click a button , put that value in the textbox and core data is updated without having to click in the text box
    regards
    Tony

    Does this help?

  • Core Data and Xcode 4

    It seems as if there are some very important parts of the Core Data data model editor missing, namely setting up "To Many" relationships, and setting the deletion rules.
    Where do you do this in Xcode 4?

    nevermind, I've found it. For anyone else looking, you must have the Utility View open (the left-side view from the top bar), And have it set to "Show Data Model Inspector" (on my screen, the 3rd of the top icons on the utility view)
    Kinda frustrating that it's so hidden...

  • Core Data and uniquing?

    Either I'm not understanding what the term "uniquing" means in Core Data, or I'm not fetching my data properly. I have a pretty simple data model. Three entities: Community, Asset, and Category. Each Community has a relationship to multiple categories. Each category has a relationship to multiple assets. Each asset that is created must have one and only one category.
    In the code I've posted, I'd like to output all the categories that a specific community has into the console. I thought that because of Core Data's uniquing capability, only one category of the same name could exist at a time (name is the only attribute for a category). However, when I print to the console, I'm getting duplicate category names.
    // Fetch Community instances in the database, and add them to an NSMutableArray
    NSFetchRequest *request = [[NSFetchRequest alloc] init];
    NSEntityDescription *community = [NSEntityDescription entityForName:@"Community" inManagedObjectContext:managedObjectContext];
    [request setEntity:community];
    // Only return the community instances that have the cityName of the cell tapped in the CommunitiesNonEditableTableViewController
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(cityName like %@)", cellCityName];
    [request setPredicate:predicate];
    NSError *error;
    NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
    if (mutableFetchResults == nil) {
    // Handle the error.
    // Set communitiesArray with mutableFetchResults
    [self setCommunitiesArray:mutableFetchResults];
    [mutableFetchResults release];
    [request release];
    // Creates a community instance using the community stored in the array at index 0. This is the only community in the array.
    Community *communityInstance;
    communityInstance = [communitiesArray objectAtIndex:0];
    // Retrieves existing categories of assets in the community, and adds them to an NSSet
    NSSet *communityCategoriesSet = communityInstance.categories;
    // Converts NSSet to an NSArray with each category as an index
    NSArray *communityCategoriesArray = [communityCategoriesSet allObjects];
    // For loop that iterates through the array full of categories, retrieves the names of each category, and adds it to an NSMutableArray
    categoryNames = [[NSMutableArray alloc] init];
    int i;
    for (i = 0; i < [communityCategoriesArray count]; i++) {
    Category *categoryInstance;
    categoryInstance = [communityCategoriesArray objectAtIndex:i];
    [categoryNames addObject:categoryInstance.name];
    // Prints array full of category names to console
    NSLog(@"%@", categoryNames);
    When I execute this, I get duplicate names in the console. Why?
    Thanks for the help!

    You need to set the name as a key or specify unique when creating the table and that column. Generally it is bad to use a city name as a unique id, since there are many cities with the same name (Middletown) in different states. You should use a number, autoincrement, as the id.

  • Core Data and Cocoa Binding

    Hello,
    I'm trying to make core data application and I refer to following url as test.
    http://developer.apple.com/cocoa/coredatatutorial/index.html
    However, I have following error.
    2011-03-04 00:32:01.476 XMLTest2CoreData[9954:a0f] An uncaught exception was raised
    2011-03-04 00:32:01.479 XMLTest2CoreData[9954:a0f] Cannot create BOOL from object (
    ) of class __NSArray0
    2011-03-04 00:32:01.481 XMLTest2CoreData[9954:a0f] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot create BOOL from object (
    ) of class __NSArray0'
    * Call stack at first throw:
    0 CoreFoundation 0x00007fff87de97b4 __exceptionPreprocess + 180
    1 libobjc.A.dylib 0x00007fff852cd0f3 objcexceptionthrow + 45
    2 CoreFoundation 0x00007fff87de95d7 +[NSException raise:format:arguments:] + 103
    3 AppKit 0x00007fff84830e78 _NSBoolFromValue + 443
    4 AppKit 0x00007fff848309a9 -[NSEditableBinder _setStatesImmediatelyInObject:mode:triggerRedisplay:] + 554
    5 AppKit 0x00007fff84830778 -[NSEditableBinder _observeValueForKeyPath:ofObject:context:] + 116
    6 AppKit 0x00007fff84775a33 -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 557
    7 AppKit 0x00007fff84752546 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1172
    8 AppKit 0x00007fff8475088d loadNib + 226
    9 AppKit 0x00007fff8474fd9a +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 248
    10 AppKit 0x00007fff8474fbd2 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 326
    11 AppKit 0x00007fff8474d153 NSApplicationMain + 279
    12 XMLTest2CoreData 0x0000000100001089 main + 33
    13 XMLTest2CoreData 0x0000000100001060 start + 52
    terminate called after throwing an instance of 'NSException'
    Entity is only one "Title" and it has one attribute "name".
    My XCode is version 3.2.5.
    Please give me advice...
    Thank you.

    I have a new problem...
    I succeed to run the application, and save the data.
    But cannot open the saved data.
    In addition, The application doesn't ask anything as terminating it.
    I checked that I could save the data.
    </metadata>
    </databaseInfo>
    <object type="GENE" id="z102">
    <attribute name="name" type="string">PTEN</attribute>
    <attribute name="creationdate" type="date">321113984.72053700685501098633</attribute>
    <relationship name="mrna" type="1/1" destination="M_RNA"></relationship>
    <relationship name="protein" type="1/1" destination="PROTEIN"></relationship>
    <relationship name="title" type="1/1" destination="TITLE"></relationship>
    </object>
    <object type="TITLE" id="z103">
    <attribute name="name" type="string">PTEN</attribute>
    <relationship name="genelist" type="0/0" destination="GENE" idrefs="z102"></relationship>
    </object>
    </database>
    And I tried to check the log...
    but, I have only following message...
    2011-03-06 23:56:15.660 XMLTest2CoreData[14116:a0f] Application terminating.
    - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
    NSLog(@"Application terminating.");
    if (!managedObjectContext) {
    NSLog(@"managedObjectContext is nil...");
    return NSTerminateNow;
    if (![managedObjectContext commitEditing]) {
    NSLog(@"%@:%s unable to commit editing to terminate", [self class], _cmd);
    return NSTerminateCancel;
    if (![managedObjectContext hasChanges]) {
    NSLog(@"Application has not changed.");
    return NSTerminateNow;
    NSError *error = nil;
    if (![managedObjectContext save:&error]) {
    NSLog(@"Application terminating and attempting to save.");
    // This error handling simply presents error information in a panel with an
    // "Ok" button, which does not include any attempt at error recovery (meaning,
    // attempting to fix the error.) As a result, this implementation will
    // present the information to the user and then follow up with a panel asking
    // if the user wishes to "Quit Anyway", without saving the changes.
    Any advice would be helpful.
    Thank you.
    Message was edited by: Rascal3

  • New firmware m1217nfw release date and other questions ...

    Hi everybody!
    Does anybody knows when a new firmware update will be released? It seems that the latest release (2013-09-30, version 20130912) has a serious known issue and HP recommends : "Please do not update with this version" on the web site ...
    The problem is that the version installed on my printer (version 20130211) seems to have a potential security vulnerability. The vulnerability could be exploited remotely to gain unauthorized access to
    data! An intermediate firmware version (2013-07-26, version 20130703) was previously released to correct this issue but I can't find it on hp web site. Does anybody knows where I can find it???
    My last question is about firmware update : HP recommends to update firmware by using an USB 2.0 cable connected to the printer. I successfully updated the firmware (twice) with the network interface of the printer. Should I avoid this method and use an USB 2.0 cable?
    Thanks in advance for your reply.

    You can't.
    They did this for a reason, as part of FairPlay.
    There's no way to get around this.....
    If the information on the purchase content is wrong (like wrong release date), contact Apple, and they might be able to correct it.
    Message was edited by: Kento Ito

  • Mac Pro - Oct Core? and other questions......

    Hi all, Im new to these forums - I am one half of a UK production duo named big mister music.
    We are about to bite the bullet and make a new mac pro purchase and at the same time go for an apogee ensemble. My question is two fold really, is the oct core worth paying extra for? In real world terms.... and the ensemble? Anyone used one? Worth the cash?
    Brilliant! thanks for your replies in advance and I hope to make a positive impact on these boards in the future!
    Ian

    Now after going to the leading Mastering house in the U.K.
    they Master all the Big Names, i don't even want to say,
    however here goes,
    they gave me two of the Main dealers in the U.K. that supply not most but All the store's in the U.K. with Apogee and the other Apogee & RME.
    So after calling Apogee in the U.K. main supplier before on price's of Ensemble and Rosetta 800, without a doubt 800 came out on top,
    Ensemble not even close in their line of Converters,
    I try to ask for Discount has a Student, as i though it was a Apple Product,
    they weren't having it,
    has it was said its not a Apple product, but made for Apple Logic,
    and integrate well with Logic,
    therefore their goes my discount out the window!
    Now after i got the numbers for the main dealers, before i ask for discount
    they gave me Discount when they say who gave the number,
    meaning its not who you know but who knows you.
    Ensemble was a few £ short of 1400.00 new price £1050.00
    Rosetta price drop by about £200 though.
    Then again there was a Blind test of Apogee Rosetta 800 v RME Fireface800,
    with Apogee customers, and guess what?
    About 90% of them pick RME 800,
    do a google search and you'll find it,
    In saying this Fireface 800 and Top-line Apogee products is Marginally different,
    So it all boils down to the type of sound you want,
    One ads Color, while the other is transparent,
    Apogee Ads RME Transparent
    Fr.BlayZay.

  • Convert char to date and query question

    Hi,
    I am working on Oracle database 9i.
    I have t to insert date columns of creation_date and last_update_date from table Y to another table X in a character format YYYYMMDD. I did that with the following:
    replace(to_char(sysdate,'YYYY/MM/DD'),'/')
    My first question is how can I change the format again to oracle date when I read from table X?
    My second question I want to read data from table Y to table Z on the following condition:
      rows exist in both table but the last update_date in table Y is greater than the last_update_date in table Z  . How can I achieve this?
    thank you

    Hi,
    AHS wrote:
    Hi,
    I am working on Oracle database 9i.
    I have t to insert date columns of creation_date and last_update_date from table Y to another table X in a character format YYYYMMDD. I did that with the following:
    replace(to_char(sysdate,'YYYY/MM/DD'),'/')
    My first question is how can I change the format again to oracle date when I read from table X?
    My second question I want to read data from table Y to table Z on the following condition:
      rows exist in both table but the last update_date in table Y is greater than the last_update_date in table Z  . How can I achieve this?
    thank you
    If you want to show the current date in 'YYYYMMDD' format without '/' characters, then use 'YYYYMMDD' format without '/' characters:
    TO_CHAR (SYSDATE, 'YYYYMMDD')
    There's no need for REPLACE.
    Justin is right (as usual).  Keep date information in DATE columns.  If you need to display a DATE in a particular format, use TO_CHAR when displaying it (or use "ALTER SESSION SET NLS_DATE_FORMAT" to change the default display format for all DATEs).
    For your second question, start a second thread.
    Whenever you have  question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ:
    The second problem sounds like a job for the analytic MAX function.

  • Setting: Date and Time question

    Don't ask but I really just noticed this now since the last clock change in March...
    I changed the time to the correct time but every day it defaults back an hour or really every time I turn it on to use, it defaults back to the wrong time.
    How do you make it display the correct time each time you turn it on? Does it have to do with the option "24 hour clock" being on or off? If the "24 hour clock" is ON, wouldn't that mean that the battery will be running 24/7 even though the switch is turned off to show the red/orange thing? Thanks.

    I see, now I understand. My computer crashed a few years ago and the clock was messed up after I brought it back to life. Maybe that's what it is. And even so, it's the same story with my computer, I fix the clock and Time Zone and it is good for one day only until I turn it off. The clock is wrong the next day.
    Thanks again. Sometimes when I go for a long walk I like to know what time it is - but then again I could always wear my watch.... but with me wearing the sunblcok and sweating, the watch could get dirty.......

  • Spotlight is continuously indexing the data i migrated from an old mac. At first is it said 450 hours and then it vanished. Now it is is saying indexing volumes since last 10 hours

    I bought a new macbook pro Intel core i7 and migrated my data about 260 GB from the previous macbook pro. Since then the spot light is indexing volumes sometimes in between showing the progess bar indicating 450 hours remaining. It vanished after sometime and Indexing volumes showed up again. Obviously i cannot keep the mac on forever, will it begin the indexing all over again.

    You should really read the manual.
    "How do you restore from backup? "
    Restore.  When given the choice, choose to use backup.
    "And how can I check to see if the pics and videos are on my computer somewhere first??"
    They would only be where you put them.  What program did you use to import them?  Pics/vids taken with ipod are not part of the sync process at all.  You should be importing them just as you would with any digital camera.
    If you did not import them, then they are not on your computer.

Maybe you are looking for