Re: Can someone explain the locks?
Re: Can someone explain the locks?
- Subject: Re: Can someone explain the locks?
- From: Pascal Robert <email@hidden>
- Date: Thu, 12 Jan 2012 11:19:34 -0500
Le 2012-01-12 à 11:11, James Cicenia a écrit :
> Ok --
>
> So, why would I need more than one lock? Why not just a modified date?
Putting it on dates is the worst thing to do on locks! Check the list archives, you will get problems when using locks on timestamps. Put the locks on string/number attributes that people modify often, e.g. attributes that are editable by users and can cause problems if two people update the same record. For example, for a blog post, you should have a lock on the title.
> James
>
> PS: "legacy" Been awhile since I have been to apples docs. Not a good thing to first show a client!
Well, not much people working on rewriting them… Can't do everything.
>
> On Jan 12, 2012, at 9:51 AM, Ramsey Gurley wrote:
>
>>
>> On Jan 12, 2012, at 8:33 AM, James Cicenia wrote:
>>
>>> Hello -
>>>
>>> Ok, this update / add entity problem is driving me a little nuts.
>>> If I add a new record, it won't recognize the related record that was picked, and won't save.
>>> If I edit any existing record and do nothing but hit save... bam.. row diff error!
>>>
>>> So, that got me to exploring those little black locks that I never, ever worried about, or changed!
>>>
>>> But now that I have focused on them.. what the heck do they really mean or do?
>>
>> http://developer.apple.com/legacy/mac/library/documentation/WebObjects/UsingEOModeler/4WorkingWithAttributes/WorkingWithAttributes.html#//apple_ref/doc/uid/TP30001018-CH204-BABBDEIE
>>
>>
>>> If I save a record
>>> it should save.. locks be damned. So, I figured it has to do with "optimistic" locking. But what?
>>>
>>> Should I leave the default set? Should I delete all and improve performance?
>>>
>>>
>>> Wondering
>>> James _______________________________________________
>>> 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
>>
>
> _______________________________________________
> 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
_______________________________________________
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