Hi,
there is a bug in DataObject::write():
// New records have their insert into the base data table done
// first, so that they can pass the generated primary key on
// to the rest of the manipulation
line 419: $baseTable = $ancestry[0];
$ancestry is not set anywhere in the method!