[v.1.3] Model's onConstruct does not fire after unserialize

Hi all,

I have the following question about Model's behaviour during unserialize:


Any help would be greatly appreciated!

Thanks, T>

This is how __construct also works, it's not called after every unserialize. An unserialize action is not creating the object again it's just retrieving it from a "sleep" state.


Thanks, Andres.

But what about my second question - why doesn't the second instance of Book get $b assigned to 2?

edited Jun '15

Initialize is called once per model, further instantiations of the model do not call initialize anymore. "Initialize" is used to define the relationships of the model or set up any configuration.