Mirror<?> ta = Mirror.me(one.target());
Field referFld = mirror.getField(one.field());
Field targetPkFld = lookupPkByReferField(ta, referFld);
return Link.getLinkForOne(mirror, field, ta.getType(), referFld, targetPkFld);
}
Many many = field.getAnnotation(Many.class);
if (null != many) {
Mirror<?> ta = Mirror.me(many.target());
Field pkFld;
Field targetReferFld;
if (Strings.isBlank(many.field())) {
pkFld = null;
targetReferFld = null;
} else {
targetReferFld = ta.getField(many.field());
pkFld = lookupPkByReferField(mirror, targetReferFld);
}
return Link.getLinkForMany( mirror,
field,
ta.getType(),
targetReferFld,
pkFld,
many.key());
}
ManyMany mm = field.getAnnotation(ManyMany.class);
if (null != mm) {
// Read relation
Statement stat = null;