propelorm/Propel — pull request #314 by K-Phoen (2012-03-14 15:27:23+00:00)
Title: Fix: some isVersionningNecessary() calls can cause fatal errors

Given the following model, some isVersionningNecessary() calls would cause
fatal errors.

User Group
---- -----
name name
group_id [FK, not required]

When saving an user with no group but a name, the isVersioningNecessary()
method returns true because the object is modified. But if we save again the
same user - as there are no modifications on the user - the foreign keys
are checked and isVersioningNecessary() is called on them, which causes
a fatal error when one of them is not set.

In fact, calling isVersioningNecessary() on any not-new, not modifiable object, with null foreign keys will cause a fatal error.