#6066: [TEST][PATCH] Model->create with filterKey does not unset audit fields -----------------------------------------------+---------------------------- Reporter: GreyCells | Type: Bug Status: new | Priority: Low Milestone: 1.2.x.x | Component: Model Version: 1.2 Final | Severity: Normal Keywords: model create filterKey created | Php_version: n/a Cake_version: 8015 | -----------------------------------------------+---------------------------- Changeset r6438 introduced some really useful functionality, allowing easy cloning of records. When {{{$filterKey}}} is set to true, the developer's intention is usually to create a new record. However, the audit fields are not unset, so the created field remains the same as the original record (updated|modified are handled differently in the {{{Model->save()}}}).
I think any fix for this should go in {{{Model->create()}}} rather than {{{Model->save()}}} so that {{{Model->data}}} is consistent in the model callbacks. I've logged this as a bug rather than an enhancement, 'cos I would expect the {{{created}}} field to be correct when I save a new record. -- Ticket URL: <https://trac.cakephp.org/ticket/6066> CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/> Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tickets cakephp" group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to tickets-cakephp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~----------~----~----~----~------~----~------~--~---