Propel
Propel copied to clipboard
Missing key value Parser
I have this error when set Child table data $child_obj->setChildDatas(new Collection (array($childData))); and save parent object $obj->save().
Unknown parser class "Propel\Runtime\Parser\KeyvalueParser" any Idea on this
What version of Propel are you using? Can we see the smallest possible script that replicates this problem?
I know this is old topic. In our project we had same problem.
When you are using versionable behaviour it is using $object->toKeyValue('Id', 'Version')
call. After investigation we found that Collection class does not contains it, so magic function __call tries to use Parser class.
Solution in this case is usage of ObjectCollection class. This class is also used internally in relations.
$child_obj->setChildDatas(new ObjectCollection(array($childData)));
and save parent object $obj->save().