We copy only the data, the fields are reset losing any internal variables.
Conceptually is perfect, this is hot code and we must avoid any complex operations, but I think someone with a deeper knowledge of the recent @atk4/data development must take a look (@DarkSide666 @mvorisek @georgehristov) and decide to rewrite Password Field or Model load flow.
Field password store the hash in property $passwordHash
in 2.4 - after load is still present in the field :
in 3.0 - after load is not present in the field :
I think it comes from here: https://github.com/atk4/data/blob/54cd831430139a2b6f8db72630272398abe301d8/src/Model.php#L1248
We copy only the data, the fields are reset losing any internal variables.
Conceptually is perfect, this is hot code and we must avoid any complex operations, but I think someone with a deeper knowledge of the recent @atk4/data development must take a look (@DarkSide666 @mvorisek @georgehristov) and decide to rewrite Password Field or Model load flow.