• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: db Model and EOModel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: db Model and EOModel


  • Subject: Re: db Model and EOModel
  • From: Art Isbell <email@hidden>
  • Date: Sat, 22 Mar 2008 12:30:42 -1000

On Mar 22, 2008, at 4:07 AM, James Cicenia wrote:

But is there a rule of thumb about which attributes should have it turned on, and, why when you create an attribute it is always on?


You shouldn't use any attribute for locking that may not match in a where clause only due to rounding, truncating, or other differences in precision between the DB and the WO app. Floats, doubles, etc., would be in that category. For some databases, dates would also be in that category, particularly when the date has a precision in fractional seconds. All of these could result in false optimistic locking errors.

If you don't care whether user1 could update an attribute that might have been updated by user2 since user1 fetched the object whose attribute is being updated (i.e., user1 would be updating an attribute whose current value he hadn't seen), then this attribute need to be used for locking.

I guess the default is for an attribute to be used for locking because it's probably more common that a user should not be allowed to update an attribute whose value had changed without his knowledge.

Aloha,
Art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >db Model and EOModel (From: Gustavo Pizano <email@hidden>)
 >Re: db Model and EOModel (From: Jean-François Veillette <email@hidden>)
 >Re: db Model and EOModel (From: James Cicenia <email@hidden>)

  • Prev by Date: Using Design Patterns ???
  • Next by Date: Fetching a specified Object.
  • Previous by thread: Re: db Model and EOModel
  • Next by thread: Re: db Model and EOModel
  • Index(es):
    • Date
    • Thread