/** * INTERNAL: */ public void addMultipleTableForeignKeyField(DatabaseField pkField, DatabaseField fkField) { m_descriptor.addMultipleTableForeignKeyField(pkField, fkField); m_pkJoinColumnAssociations.put(fkField.getName(), pkField.getName()); }
/** * PUBLIC: * This protocol can be used to associate multiple tables with foreign key * information. The join criteria will be generated based on the fields * provided. By default TopLink associates multiple tables using a primary * key join where the primary keys fields are named the same. */ public void addMultipleTableForeignKeyFieldName(String sourceFieldName, String targetFieldName) throws DescriptorException { addMultipleTableForeignKeyField(new DatabaseField(sourceFieldName), new DatabaseField(targetFieldName)); }