Re: [OS-JIRA] Created: (WOL-407) Entity Modeler -> please default new attributes with locking=false and allows_null=true

From: Mike Kienenberger (mkienen..mail.com)
Date: Fri Apr 27 2007 - 09:53:13 EDT

  • Next message: Lachlan Deck: "Re: [OS-JIRA] Created: (WOL-407) Entity Modeler -> please default new attributes with locking=false and allows_null=true"

    Not sure how Entity Modeler does it, but Cayenne Modeler has a
    checkbox that you can use to apply the locking/non-locking state to
    every attribute of every entity.

    As for full optimistic locking (which is what you're doing if you lock
    by every attribute), the advantage is that you only have an optimistic
    locking failure if your current data state doesn't match the actual
    data state in the database.

    Ie, you read in your data, other processes make net efffect noop
    changes to the data, and then you write out your data without any
    locking exception.

    This also means that you don't have to maintain a version attribute or
    a last modified attribute for every table since the locking is based
    on actual data values and not an arbitrary locking column in the
    table.

    On 4/27/07, Lachlan Deck <lachlan.dec..mail.com> wrote:
    > On 27/04/2007, at 9:48 PM, Mike Schrag wrote:
    >
    > >>> Entity Modeler -> please default new attributes with
    > >>> locking=false and allows_null=true
    > >>
    > >> Can someone please to me what the point in having locking only on
    > >> the primary key is? The way I understand it you may was well not
    > >> have any locking at all if you do this. I was of the belief that
    > >> you want locking applied to ANY and ALL attributes that are able
    > >> to be edited concurrently and don't change automagically. Having
    > >> locking off for new attributes would be the wrong default
    > >> behaviour if you ask me.
    > > I actually agree with this as well, which is why I haven't fixed
    > > this. I can add this as a preference setting, but that requires me
    > > to make an entity modeler preference page,
    > +1
    >
    > Personally I don't understand the point of having locking on every
    > attribute by default - and it's annoying having to untick them
    > constantly and to constantly tick 'allow null'. I can appreciate if
    > you'd want locking on a small subset of the attributes to indicate
    > that a change has occurred such as on a 'modified' timestamp, but
    > other than that what benefit do you gain by locking every attribute?
    >
    > with regards,
    > --
    >
    > Lachlan Deck
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Apr 27 2007 - 09:53:21 EDT