I currently have in CakePHP 3 a table called Tickets that has a few flags such as head_ticket and latest_ticket. Essentially when ever I edit a record I create a new row (a uuid field keeps the records linked together) and set the latest_ticket flag to true as this row contains the latest information.
What I would like to know is that is there a way I can do something in the find where I can get all the records that have the head_ticket set to true but update the head ticket data columns returned on-the-fly with the latest data from the row that has the latest_ticket flag set to true at the same time? It's almost like an afterFind scenario but one which has been deprecated in CakePHP 3
Thanks