public void appendIsNotNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols aren't // null; if inverse, then we have to do a sub-select to see if any // inverse objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 = 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS NOT ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, false); }
public void appendIsNotNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols aren't // null; if inverse, then we have to do a sub-select to see if any // inverse objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 = 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS NOT ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, false); }
public void appendIsNotNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols aren't // null; if inverse, then we have to do a sub-select to see if any // inverse objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 = 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS NOT ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, false); }
public void appendIsNotNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols aren't // null; if inverse, then we have to do a sub-select to see if any // inverse objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 = 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS NOT ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, false); }
public void appendIsNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols are null; // if inverse, then we have to do a sub-select to see if any inverse // objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 <> 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, true); }
public void appendIsNotNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols aren't // null; if inverse, then we have to do a sub-select to see if any // inverse objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 = 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS NOT ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, false); }
public void appendIsNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols are null; // if inverse, then we have to do a sub-select to see if any inverse // objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 <> 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, true); }
public void appendIsNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols are null; // if inverse, then we have to do a sub-select to see if any inverse // objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 <> 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, true); }
public void appendIsNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols are null; // if inverse, then we have to do a sub-select to see if any inverse // objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 <> 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, true); }
public void appendIsNull(SQLBuffer sql, Select sel, Joins joins) { // if no inverse, just join to mapping's table (usually a no-op // because it'll be in the primary table) and see if fk cols are null; // if inverse, then we have to do a sub-select to see if any inverse // objects point back to this field's owner if (field.getJoinDirection() != field.JOIN_INVERSE) { //### probably need some sort of subselect here on fk constants joins = join(joins, false); Column[] cols = field.getColumns(); if (cols.length == 0) sql.append("1 <> 1"); else sql.append(sel.getColumnAlias(cols[0], joins)). append(" IS ").appendValue(null, cols[0]); } else testInverseNull(sql, sel, joins, true); }