addJoinConstraints(field1);
ValueMapping vm = field1.getElementMapping();
vm.setDeclaredType(cls2.getDescribedType());
vm.setForeignKey(fks[1]);
addConstraints(vm);
field1.setStrategy(new RelationCollectionTableFieldStrategy(),
null);
if (_custom != null)
_custom.customize(field1);
}
name = getRelationName(cls1.getDescribedType(), true, fks[0],
false, cls2);
FieldMapping field2 = newFieldMapping(name, Set.class, null, fks[0],
cls2);
if (field2 == null)
return;
field2.setJoinForeignKey(fks[1]);
addJoinConstraints(field2);
ValueMapping vm = field2.getElementMapping();
vm.setDeclaredType(cls1.getDescribedType());
vm.setForeignKey(fks[0]);
addConstraints(vm);
if (field1 != null && field1.getMappedBy() == null)
field2.setMappedBy(field1.getName());
field2.setStrategy(new RelationCollectionTableFieldStrategy(), null);
if (_custom != null)
_custom.customize(field2);
}