model.getTable(1).getForeignKey(0).addReference(new Reference(newPkColumn, newFkColumn));
model.getTable(1).getForeignKey(0).addReference(new Reference(newFkColumn, newPkColumn));
    public void testAddReferenceToFK()    {    	Database model = createDatabase(TEST_ADD_REFERENCE_TO_FK_MODEL);    	Column newPkColumn = new Column();    	newPkColumn.setName("pk2");    	newPkColumn.setTypeCode(Types.DOUBLE);    	newPkColumn.setPrimaryKey(true);    	newPkColumn.setRequired(true);    	model.getTable(0).addColumn(newPkColumn);    	Column newFkColumn = new Column();    	newFkColumn.setName("avalue2");    	newFkColumn.setTypeCode(Types.DOUBLE);    	newFkColumn.setRequired(true);    	model.getTable(1).addColumn(newFkColumn);    	model.getTable(1).getForeignKey(0).addReference(new Reference(newPkColumn, newFkColumn));    	alterDatabase(model);        Database modelFromDb = readModelFromDatabase("roundtriptest");        assertEquals(getAdjustedModel(),        		     modelFromDb);    }