FieldMapping mapped = field.getMappedByMapping();
FieldMappingInfo finfo = field.getMappingInfo();
ValueMappingInfo vinfo = elem.getValueInfo();
boolean criteria = vinfo.getUseClassCriteria();
if (mapped != null) {
mapped.resolve(mapped.MODE_META | mapped.MODE_MAPPING);
if (!(mapped.getStrategy() instanceof RelationFieldStrategy))
throw new MetaDataException(_loc.get("not-inv-relation",
field, mapped));
vinfo.assertNoSchemaComponents(elem, !adapt);
elem.setForeignKey(mapped.getForeignKey