Z_OPT field in coredata sqlite database. What it is for?

  • I need to populate with SQL a table in one coredata's sqlite database, but I
    can't find info about the field Z_OPT, which appears in almost every table.
    The meaning and functionality to populate all the other fields is clear.

    Thanks in advance.
  • I think I'm answering to my self again...
    Anybody could confirm if this field contains the number of modifications for
    the record, including the first insertion???
    Thanks in advance!

    On 10/4/07, Gustavo Vera <gustavovera...> wrote:
    >
    > I need to populate with SQL a table in one coredata's sqlite database, but
    > I can't find info about the field Z_OPT, which appears in almost every
    > table.  The meaning and functionality to populate all the other fields is
    > clear.
    >
    > Thanks in advance.
    >
  • > I need to populate with SQL a table in one coredata's sqlite
    > database, but I
    > can't find info about the field Z_OPT, which appears in almost every
    > table.
    > The meaning and functionality to populate all the other fields is
    > clear.

    Standard mailing list question: what are you trying to achieve? Why
    not insert the data using the Core Data API itself?

    -Ben
  • I knew that that question would arrive sooner or later… :)
    I need to insert new info in a coredata DB as part of an incremental
    migration process. If I want to implement those migrations in "coredata
    terms" I'm going to need also the corresponding data models for each
    incremented version. Even worst, If I really wanna feel like in the "every
    day work" with those old mounted models, I'm gonna need also the
    corresponding versions of the customized entities (I'm not using instances
    of NSManagedObject but instances of subclasses of it). Instead of  that, I'm
    implementing the migrations processes using SQL. From time to time, when the
    development  activities take us to the stage or situation where the data
    model structure or pre-initialized data for the application changes, we only
    need to implement a migration from the previous stage to the new one.
    When the app is deployed, the app support folder is analyzed to see the
    version of the previous DB (if there is one) and then, executes incremental
    upgrades until the DB gets fully updated to the current version.
    This schema is a recent implementation in our project (until now, there is
    only three incremental migrations implemented, dispersed in aprox. 40 svn
    revisions), but (until now) is working flawlessly.

    On 10/4/07, Ben Stiglitz <stig...> wrote:
    >
    >> I need to populate with SQL a table in one coredata's sqlite
    >> database, but I
    >> can't find info about the field Z_OPT, which appears in almost every
    >> table.
    >> The meaning and functionality to populate all the other fields is
    >> clear.
    >
    > Standard mailing list question: what are you trying to achieve? Why
    > not insert the data using the Core Data API itself?
    >
    > -Ben
    >
  • > I need to insert new info in a coredata DB as part of an incremental
    > migration process. If I want to implement those migrations in
    > "coredata terms" I'm going to need also the corresponding data
    > models for each incremented version. Even worst, If I really wanna
    > feel like in the "every day work" with those old mounted models, I'm
    > gonna need also the corresponding versions of the customized
    > entities (I'm not using instances of NSManagedObject but instances
    > of subclasses of it). Instead of  that, I'm implementing the
    > migrations processes using SQL. From time to time, when the
    > development  activities take us to the stage or situation where the
    > data model structure or pre-initialized data for the application
    > changes, we only need to implement a migration from the previous
    > stage to the new one.

    CoreData could always end up changing the schema under you, and then
    you’re stuck. You’ll have a lot more luck using CoreData to do this.
    Check out the bleepsoft migration code:
    http://opensource.bleepsoft.com/index.php/Main/DataMigration
    http://maccode.googlecode.com/svn/trunk/Snippets/CoreData/

    An article about the code and migration in general:
    http://outerlevel.com/blog/2007/04/13/handle-core-data-model-changes/

    There are also plenty of answers in developer blog posts and the
    archives of this list.

    -Ben
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today