*/
public void testLeftOuterJoin() {
Table table = getPrimaryKeyTable();
Table otherTable = getForeignKeyTable(table);
SelectStatement statement = otherTable.getSelectStatement();
SelectTableReference tableReference = statement.getSelectTableReference();
JoinReference joinReference = tableReference.leftOuterJoin(table);
TableReference refLocal = tableReference;
TableReference refRef = tableReference.getRightJoinedTableReference();
joinReference.getOn().addJoin((ForeignKey) otherTable.getForeignKeys().next(),
refLocal, refRef);
CombinedConstraint cc = statement.getWhere();
BooleanConstraint bc = cc.createEQ();
bc.addPart(tableReference.newColumnReference("MyIndex"));
bc.addPlaceholder();
SQLGenerator generator = getSQLGenerator();
generator.setLineTerminator("\n");
String got = generator.getQuery(statement);