return new IndexedPropertyMetadata(indexed.create(), indexed.unique());
}
@Override
public RelationshipMetadata createRelationMetadata(AnnotatedElement<?> annotatedElement, Map<Class<?>, TypeMetadata> metadataByType) {
Relation relationAnnotation;
if (annotatedElement instanceof PropertyMethod) {
relationAnnotation = ((PropertyMethod) annotatedElement).getAnnotationOfProperty(Relation.class);
} else {
relationAnnotation = annotatedElement.getAnnotation(Relation.class);
}
String name = null;
if (relationAnnotation != null) {
String value = relationAnnotation.value();
if (!Relation.DEFAULT_VALUE.equals(value)) {
name = value;
}
}
if (name == null) {