An identical check here causes the dirty attributes array to sometimes contain unchanged fields, such as comparing foreign keys which could be a string and an int of the same value.