BasicFieldMetadata metadata = (BasicFieldMetadata) mergedProperties.get(key);
metadata.setFieldType(SupportedFieldType.ADDITIONAL_FOREIGN_KEY);
metadata.setExplicitFieldType(SupportedFieldType.ADDITIONAL_FOREIGN_KEY);
metadata.setLookupDisplayProperty(annot.lookupDisplayProperty());
metadata.setForcePopulateChildProperties(annot.forcePopulateChildProperties());
metadata.setEnableTypeaheadLookup(annot.enableTypeaheadLookup());
if (!StringUtils.isEmpty(annot.lookupDisplayProperty())) {
metadata.setForeignKeyDisplayValueProperty(annot.lookupDisplayProperty());
}
metadata.setCustomCriteria(annot.customCriteria());
metadata.setUseServerSideInspectionCache(annot.useServerSideInspectionCache());