Pedroesca
beforeSave whith relations
I have the following process in beforeSave() of EditSale.php, in which I restore the stock (quantities) of products, before the records are saved, as indicated by the "beforeSave" hook, but it turns out that when entering this hook the data of the relationship (SaleDetails) has already been saved.
i.e. where do i get the original detail before it is saved? is there a hook for this? for these cases beforesave does not work.
11 replies