Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveRecord::Base.touch won't dump optimistic locking column.

#5505

Calling touch on an object to increase the updated_at won't increase the optimistic locking column.

From a quick glance over the history I think that this:

http://github.com/rails/rails/commit/e4943e93c2571cba8630eec2e77000...

is the source of my problem... Bypassing update_attribute won't allow the optimistic locking's update to be called.

I am very eager to start using v3 and this is a major stumbling block for me.

Reported by jlewalle (at gmail) · August 30th, 2010 @ 11:21 PM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. jlewalle (at gmail)
    jlewalle (at gmail)

    I'll hold off on attempting to fix this on my own until I've got some feedback.

    August 30th, 2010 @ 11:22 PM

  2. Neeraj Singh
    Neeraj Singh
    • Assigned user set to José Valim
    • Importance changed from to Low

    Let's see what Mr. Valim has to say on this one.

    August 31st, 2010 @ 02:10 AM

  3. José Valim
    José Valim

    Optimistic locking should be updated! Probably just adding it as after_touch callback should fix it!

    September 2nd, 2010 @ 10:49 AM

  4. Cesario
    Cesario
    • Tag changed from activerecord locking touch to activerecord locking touch, 3.0, patch

    LH doesnt like me (or at least having me attach a patch :)) : https://github.com/rails/rails/pull/119
    Patch and tests are provided again master.

    November 27th, 2010 @ 10:20 AM

  5. Repository
    Repository
    • State changed from new to resolved

    (from [9d8fdfec38a145e3f5074fd8dc0216630c268e32]) removed some duplication from LH issue 5505 regarding AR touch and optimistic locking [#5505 ActiveRecord::Base.touch won't dump optimistic locking column. state:resolved]

    Signed-off-by: Santiago Pastorino and José Ignacio Costa santiago+jose@wyeworks.com
    https://github.com/rails/rails/commit/9d8fdfec38a145e3f5074fd8dc021...

    February 9th, 2011 @ 08:32 PM