• Lin Jen-Shin's avatar
    Make deleting with optimistic locking respect NULL · 5747b0d3
    Lin Jen-Shin authored
    For now deleting with optimistic locking is broken when
    lock_version is still NULL, because Rails would try to
    delete with `lock_version = 0` while in the database
    the column is still `NULL`.
    
    The monkey patches would force Rails just pass whatever
    in the column, and stop Rails from casting `NULL` into `0`
    when the value is read from database.
    
    Closes #24766
    5747b0d3
ar_monkey_patch.rb 2.16 KB