propelorm/Propel — pull request #334 by pablogd (2012-04-10 19:36:43+00:00)
Title: Fixed setting PK on new child objects of concrete-inheritance

Hi,

I'm using a schema that has concrete-inheritance on some tables and found a problem when setting PK on child objects:

$child = new Child();
$child->setId($id);
$child->save() // This gives a fatal php exception

I would expect Propel to automatically create parent object but it does not. I digged into concrete-inheritance behaviour and found the problem was on getParentOrCreate method.

From my point of view this is a bug so I wrote a patch to solve it and two unit tests to prove the problem and the fix.

Regards,

Pablo Gómez