Skip to content

Commit

Permalink
fixed equals check for columns
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Apr 26, 2019
1 parent 04f0fe5 commit 4a1bb3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/citydb/sqlbuilder/schema/Column.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public boolean equals(Object obj) {
if (obj instanceof Column) {
Column other = (Column)obj;
return table.equals(other.table) &&
name.toUpperCase().equals(other.name.toUpperCase());
name.toUpperCase().equals(other.name.toUpperCase()) &&
((asName == null && other.asName == null) || (asName != null && asName.equalsIgnoreCase(other.asName)));
}

return false;
Expand Down

0 comments on commit 4a1bb3e

Please sign in to comment.