/** * PUBLIC: * Define the source foreign key relationship in the one-to-one mapping. * This method is used to add foreign key relationships to the mapping. * Both the source foreign key field name and the corresponding * target primary key field name must be specified. */ public void addForeignKeyField(DatabaseField sourceForeignKeyField, DatabaseField targetKeyField) { this.getSourceToTargetKeyFields().put(sourceForeignKeyField, targetKeyField); this.getTargetToSourceKeyFields().put(targetKeyField, sourceForeignKeyField); this.getForeignKeyFields().add(sourceForeignKeyField); this.setIsForeignKeyRelationship(true); }
/** * PUBLIC: * Define the source foreign key relationship in the one-to-one mapping. * This method is used to add foreign key relationships to the mapping. * Both the source foreign key field name and the corresponding * target primary key field name must be specified. */ @Override public void addForeignKeyField(DatabaseField sourceForeignKeyField, DatabaseField targetKeyField) { getSourceToTargetKeyFields().put(sourceForeignKeyField, targetKeyField); getTargetToSourceKeyFields().put(targetKeyField, sourceForeignKeyField); getForeignKeyFields().add(sourceForeignKeyField); setIsForeignKeyRelationship(true); }
/** * PUBLIC: * Define the source foreign key relationship in the one-to-one mapping. * This method is used to add foreign key relationships to the mapping. * Both the source foreign key field name and the corresponding * target primary key field name must be specified. */ @Override public void addForeignKeyField(DatabaseField sourceForeignKeyField, DatabaseField targetKeyField) { getSourceToTargetKeyFields().put(sourceForeignKeyField, targetKeyField); getTargetToSourceKeyFields().put(targetKeyField, sourceForeignKeyField); getForeignKeyFields().add(sourceForeignKeyField); setIsForeignKeyRelationship(true); }