Ticket #345: Edge cases in fActiveRecord::changed()

Reporter: craigruk Type: enhancement Opened: 1 month ago Status: closed
Assigned to: wbond Priority: major Modified: 4 weeks ago Resolution: fixed

So if an active record had a blank string for an old value, and then was submitted through a form, fRequest returns NULL if there was no value, so now technically they have changed, but since the field was a varchar not null default '', then when it's stored it's back to a blank string, and thus, will not have changed. Could you either pass in an optional $schema into fActiveRecord::changed() and use default values and not null to determine more accurately whether the value has changed, or add an optional boolean to omit comparisons of this level?

Attachments

History

Reply 11/14/09 09:44:04 changed by wbond

  • status changed from new to closed.
  • resolution set to fixed.
  • description changed.

This is fixed in r731

Edit the Ticket



please register or log in to allow for editing your comment

Action