There's alreay the uniqueConstraints on the code + entity_type. In case if people want ot define another flexible entity using the same table and the same code... Not quite real use case, I know...