#832 - Refactor: Change generated SQL to use "left join" rather than "left outer join"

This commit is contained in:
Rob Bygrave
2016-10-15 14:36:11 +13:00
parent b3bfa88eb5
commit 9158f46bb3
7 changed files with 8 additions and 8 deletions
@@ -57,7 +57,7 @@ package com.avaje.ebean;
* where id in (
* select t0.id c0
* from o_customer t0
* left outer join o_address t1 on t1.id = t0.billing_address_id
* left join o_address t1 on t1.id = t0.billing_address_id
* where t0.status = ?
* and t1.country_code = ?
* and t0.id > ? )
@@ -82,7 +82,7 @@ public @interface Formula {
* as count, sum etc.
* </p>
* <p>
* The join string should start with either "left outer join" or "join".
* The join string should start with either "left join" or "join".
* </p>
*
* <p>
@@ -120,7 +120,7 @@ public final class TableJoin {
}
/**
* Return the type of join. LEFT OUTER JOIN etc.
* Return the type of join. LEFT JOIN etc.
*/
public SqlJoinType getType() {
return type;
@@ -21,7 +21,7 @@ public class DeployTableJoin {
private String table;
/**
* The type of join. LEFT OUTER etc.
* The type of join. LEFT JOIN etc.
*/
private SqlJoinType type = SqlJoinType.INNER;
@@ -222,8 +222,8 @@ public class DefaultDbSqlContext implements DbSqlContext {
sb.append(" ");
if (joinType == SqlJoinType.OUTER) {
if ("join".equals(sqlFormulaJoin.substring(0, 4).toLowerCase())) {
// prepend left outer as we are in the 'many' part
append(" left outer ");
// prepend left as we are in the 'many' part
append(" left ");
}
}
@@ -13,7 +13,7 @@ public enum SqlJoinType {
/**
* It is an outer join.
*/
OUTER("left outer join"),
OUTER("left join"),
/**
* It is automatically determined based on cardinality and optionality.
@@ -105,7 +105,7 @@ public class SqlTreeNodeExtraJoin implements SqlTreeNode {
}
if (pathContainsMany) {
// "promote" to left outer as the path contains a many
// "promote" to left join as the path contains a many
joinType = SqlJoinType.OUTER;
}
if (!manyToMany) {