Skip to content

Record::needInsert

James Cobban edited this page Apr 5, 2019 · 1 revision

#$record->needInsert

Up: class Record

This is a protected boolean attribute that is set to true in instances of classes derived from Record that are not created as a result of reading an existing record from the database. When the record is written back to the database it will be by INSERT rather than by UPDATE. This field is protected so it can only be used by derived classes. It is set to false by the method save because after that the instance does correspond to a record in the database. If this field is true then the value of the auto-increment key of tables that use that feature is invalid.

Next: $record->table

Clone this wiki locally