Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0 branch
-
None
-
Windows XP, 1.6.0_07 by Sun Microsystems Inc., Microsoft SQL Server
Description
In cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerMergerFactory.java, the following method
@Override
public MergerToken createSetNotNullToDb(DbEntity entity, final
DbAttribute column) {
return new SetNotNullToDb(entity, column) {
@Override
public List<String> createSql(DbAdapter adapter)
};
}
the cast SQLServerAdapter sqladapter = (SQLServerAdapter) adapter; will raise a Class Cast Exception.
A possible fix could be eliminating this cast as createTableAppendColumn method is defined in DbAdapter interface, so the cast is useless.
See http://www.nabble.com/Upcast-problems-w-SQLServerMergerFactory-and-AutoAdapter-td19664724.html (the patch is known but not implemented yet)