for (final AnnotationMetadata annotation : field.getAnnotations()) {
if (annotation.getAnnotationType().equals(ONE_TO_ONE)
|| annotation.getAnnotationType().equals(MANY_TO_ONE)
|| annotation.getAnnotationType().equals(ONE_TO_MANY)
|| annotation.getAnnotationType().equals(MANY_TO_MANY)) {
builder.addFieldAnnotation(new DeclaredFieldAnnotationDetails(
field, new AnnotationMetadataBuilder(annotation
.getAnnotationType()).build(), true));
builder.addFieldAnnotation(new DeclaredFieldAnnotationDetails(
field, new AnnotationMetadataBuilder(TRANSIENT).build()));
break;
}
}
}