private function readFieldDefs(array $params)
{
foreach ($params as $key => $def) {
if ($this->metadata->hasField($key) || $this->metadata->hasAssociation($key)) {
$this->fieldDefs[$key] = $this->normalizeFieldDef($def);
} else {
throw new Exception('No such field in ' . $this->entityType . ': ' . $key);
}
}
}