* Builds, if required, the mapping of an inherited field.
* @param sif
*/
private void mapHorizontalInheritedField(SpeedoField sf,
SpeedoClass sc) throws SpeedoException {
SpeedoInheritedField sif = (SpeedoInheritedField)
sc.inheritance.remappedInheritedFields.get(sf.getFQFieldName());
if (sif == null) {
sif = sc.inheritance.newSpeedoInheritedField(sf);
}
if (sf.jdoTuple == null) {
SpeedoClass rclass = sf.getReferencedClass();
//primitive field or simple reference to a persistent class
if (rclass != null && sf.join != null
&& sf.relationType == SpeedoField.ONE_ONE_BI_RELATION
&& sf.mappedByReversefield) {
// the classref belongs a bidirectionnal relationship
// ONE-ONE. In addition the foreign key is hold by the table
// of the referenced class
setJoinNColsFromParent(sif);
} else {
if (sif.columns == null) {
// ClassRef or primtive element to map localy
for (int i = 0; i < sf.columns.length; i++) {
//Same column definition but in the table of the class
SpeedoColumn col = (SpeedoColumn) sf.columns[i].clone();
col.table = sif.moClass.mainTable;
sif.addColumn(col);
}
} else {
if (rclass != null) {
for (int i = 0; i < sif.columns.length; i++) {
computeTargetColumn(sif, i, rclass);