Revision: 3732
Author: [email protected]
Date: Wed Jul 14 11:39:12 2010
Log: Corrected the duplicate name critic to warn when there are columns in
the same table with the same name.
http://code.google.com/p/power-architect/source/detail?r=3732
Modified:
/trunk/src/main/java/ca/sqlpower/architect/ddl/critic/impl/DuplicateNameCritic.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/ddl/critic/impl/DuplicateNameCritic.java
Wed Jul 14 07:10:07 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/ddl/critic/impl/DuplicateNameCritic.java
Wed Jul 14 11:39:12 2010
@@ -90,10 +90,11 @@
if (subject instanceof SQLColumn) {
final SQLColumn col = (SQLColumn) subject;
SQLTable parent = col.getParent();
+ if (col.getPhysicalName() == null) return criticisms;
int count = 0;
for (SQLColumn otherCol : columnPhysicalNameMap.get(parent)) {
- if (col.getPhysicalName().equals(otherCol)) {
+ if
(col.getPhysicalName().equals(otherCol.getPhysicalName())) {
count++;
}
}