protected function generateRecordMissingSubdefs(\record_adapter $record)
    {
        $wanted_subdefs = $record->get_missing_subdefs();

        if (!empty($wanted_subdefs)) {
            $this->getSubdefGenerator()->generateSubdefs($record, $wanted_subdefs);

            foreach ($wanted_subdefs as $subdef) {
                $this->container['monolog']->addInfo("generate " . $subdef . " for record " . $record->getRecordId());
            }
        }

        return count($wanted_subdefs);
    }