ClassMapping cm = field.getElementMapping().getTypeMapping();
return cm.toDataStoreValue(val, cm.getPrimaryKeyColumns(), store);
}
public Joins join(Joins joins, boolean forceOuter) {
ValueMapping elem = field.getElementMapping();
ClassMapping[] clss = elem.getIndependentTypeMappings();
if (clss.length != 1)
throw RelationStrategies.unjoinable(elem);
if (forceOuter)
return joins.outerJoinRelation(field.getName(),
elem.getForeignKey(clss[0]), clss[0],
elem.getSelectSubclasses(), true, true);
return joins.joinRelation(field.getName(), elem.getForeignKey(clss[0]),
clss[0], elem.getSelectSubclasses(), true, true);
}