{PT} - 3.7.2.3 created & modified (ou updated)
Estes dois campos são automaticamente preenchidos pelo CakePHP quando você chama a função save(). O campo created será preenchido apenas quando estiver inserindo um novo registro no banco de dados, já modified será preenchida em cada alteração que você faça. O campo chamado updated terá o mesmo comportamento que o modified.
Ambos os campos devem ser do tipo datetime e o valor padrão (default) setado para NULL.
{EN} - 3.7.2.3 created and modified
By defining a created or modified field in your database table as datetime fields, CakePHP will recognize those fields and populate them automatically whenever a record is created or saved to the database.
The created and modified fields will be set to the current date and time when the record is initially added. The modified field will be updated with the current date and time whenever the existing record is saved.
Note: A field named updated will exhibit the same behavior as modified. These fields need to be datetime fields with the default value set to NULL to be recognized by CakePHP.
Diferenças
| Lines: 1-7 | Lines: 1-5 | ||
| - | <title>created and modified</title> <p>By defining a <code>created</code> or <code>modified</code> field in your database table as <code>datetime</code> fields, CakePHP will recognize those fields and populate them automatically whenever a record is created or saved to the database.</p> <p>The <code>created</code> and <code>modified</code> fields will be set to the current date and time when the record is initially added. The <code>modified</code> field will be updated with the current date and time whenever the existing record is saved.</p> /> <p class="note">Note: A field named <code>updated</code> will exhibit the same behavior as <code>modified</code>. These fields need to be datetime fields with the default value set to NULL to be recognized by CakePHP.</p> |
+ | <title>created & modified (ou updated)</title> <p> />Estes dois campos são automaticamente preenchidos pelo CakePHP quando você chama a função save(). O campo <code>created</code> será preenchido apenas quando estiver inserindo um novo registro no banco de dados, já <code>modified</code> será preenchida em cada alteração que você faça. O campo chamado <code>updated</code> terá o mesmo comportamento que o <code>modified</code>.</p> /><p>Ambos os campos devem ser do tipo datetime e o valor padrão (default) setado para NULL.</p> |
