/** * INTERNAL: * Set the target relation key field names associated with the mapping. * These must be in-order with the targetKeyFieldNames. */ public void setTargetRelationKeyFieldNames(Vector fieldNames) { Vector fields = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(fieldNames.size()); for (Enumeration fieldNamesEnum = fieldNames.elements(); fieldNamesEnum.hasMoreElements();) { fields.addElement(new DatabaseField((String)fieldNamesEnum.nextElement())); } setTargetRelationKeyFields(fields); }
/** * INTERNAL: * The mapping clones itself to create deep copy. */ public Object clone() { ManyToManyMapping clone = (ManyToManyMapping)super.clone(); clone.setTargetKeyFields(cloneFields(getTargetKeyFields())); clone.setSourceKeyFields(cloneFields(getSourceKeyFields())); clone.setTargetRelationKeyFields(cloneFields(getTargetRelationKeyFields())); clone.setSourceRelationKeyFields(cloneFields(getSourceRelationKeyFields())); return clone; }
mapping.setTargetRelationKeyFields(ownerMapping.getSourceRelationKeyFields());