Hi Maciej,
I attached a new patch to prevent executing composeIds() twice in createExecution(). All of testcase could pass. If you have time, please have a look at it.
The key is we have to generate dbid, parent id, then we could save the execution. And the code for generating dbid is only exists in the save() method. setParent() mehod is only exists in the addExecution() method.
So this time, I execution setParent() by hand before save(). I think this could be solve this problem.