Bug Report #2271

ORM __set method should not check previous value to mark column as changed

Added by John Heathco over 2 years ago. Updated about 2 years ago.

Status:Closed Start date:10/22/2009
Priority:Urgent Due date:
Assignee:John Heathco % Done:

0%

Category:Modules:ORM
Target version:v3.0.2
Resolution:fixed Points:

Description

Currently ORM __set method checks the previous value to see if it was truly changed before marking the column. This means save_all() method calls will not work for values that are set to their default state (i.e. the column is initially 0 and you try updating all to 0), and will prevent save() method calls from updating columns which remain the same.

The only downside to changing this functionality is having an UPDATE on records that sets the value to what it was previously. I see this drawback as relatively minor compared to the problems experienced.

Associated revisions

History

Updated by John Heathco over 2 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Updated by Woody Gilk about 2 years ago

  • Project changed from Kohana v3.x to 78
  • Category deleted (Modules:ORM)
  • Target version deleted (v3.0.2)

Updated by Woody Gilk about 2 years ago

  • Project changed from 78 to Kohana v3.x

Updated by Woody Gilk about 2 years ago

  • Category set to Modules:ORM

Updated by Woody Gilk about 2 years ago

  • Target version set to v3.0.2

Also available in: Atom PDF