Sammaye/audittrail — pull request #4 by adeg (2013-04-23 18:27:57+00:00)
Title: Couple fixes

Hi,

I have made two fixes for the problems described below:

1. CREATE notifications still fail to add, because there is NOT NULL restriction remains in the table configuration.

2. To properly handle the case when a new model is created (behaviour $_oldattributes is empty). When the model is saved, the behaviour will register changes for all set attributes, because there are no old attributes. The problem is that $_oldattributes structure will remain empty after save(). If the model is modified once again, immediately after the save(), with only one attribute changed, the behaviour will record all fields as changed. This happens, because afterFind() is not getting called after save() or even refresh().

3. A minor cosmetic fix for afterFind() method of the behaviour class