Validation observers for insert and update
Merge pull request #237 from propcom/validate-on-insert-update

Validation observers for insert and update
Don't set the FK to null if we're going to delete it anyway

It is legitimate for the FK to form part of the PK (albeit a bad idea), and
->set() explodes if you try to change the PK. So, don't try to change the PK
if we're deleting it.

Exploding if we're not cascading is fine because this would represent a broken
DB structure.
Merge pull request #241 from propcom/1.6/develop

Don't set the FK to null if we're going to delete it anyway
fixed FK reset on delete of hasone when cascade delete is false

also cleaned up the delete in hasmany
no need to reset FK's on deleting a belongs_to object
Fix PhpErrorException undefined index: id 

If you create an "after_insert" observer that manipulates the just-inserted data, the add_primary_keys_to_where() method call will throw an undefined index exception because _original is empty and _is_new is false. Fix by setting _original to _data immediately after insert.
Fixed warning while using from_array() on new instance
Merge pull request #244 from benharold/fix_after_insert

Fix PhpErrorException undefined index: id
Merge pull request #243 from SCIF/1.6/develop

Fixed warning while using from_array() on new instance