Commit Graph

3 Commits

Author SHA1 Message Date
Lin Jen-Shin 7839aa55f5 Use Arel to avoid MySQL triple quoting 2016-12-01 17:17:04 +08:00
Lin Jen-Shin 5747b0d3ed Make deleting with optimistic locking respect NULL
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
2016-12-01 16:17:20 +08:00
Valery Sizov 8f9a7ca854 Revert the revert of Optimistic Locking 2016-08-22 18:43:13 +03:00