|
@@ -80,7 +80,7 @@ class Annotation extends AbstractAnnotationDriver
|
|
if (!is_bool($slug->unique)) {
|
|
if (!is_bool($slug->unique)) {
|
|
throw new InvalidMappingException("Slug annotation [unique], type is not valid and must be 'boolean' in class - {$meta->name}");
|
|
throw new InvalidMappingException("Slug annotation [unique], type is not valid and must be 'boolean' in class - {$meta->name}");
|
|
}
|
|
}
|
|
- if ($meta->isIdentifier($field) && !(bool)$slug->unique) {
|
|
|
|
|
|
+ if (!empty($meta->identifier) && $meta->isIdentifier($field) && !(bool)$slug->unique) {
|
|
throw new InvalidMappingException("Identifier field - [{$field}] slug must be unique in order to maintain primary key in class - {$meta->name}");
|
|
throw new InvalidMappingException("Identifier field - [{$field}] slug must be unique in order to maintain primary key in class - {$meta->name}");
|
|
}
|
|
}
|
|
// set all options
|
|
// set all options
|