if (target != null) {
Field f = new Field();
f.setName(column.getName());
f.setLinkToTargetEntity(target.getName());
f.setLinkToTargetField(TableUtils.getPrimaryKey(target));
Entity entity = new Entity();
entity.setName(table.getName());
f.setEntity(entity);
f.setBidirectional("true");
return f;
}
return null;