[Fdo_issues] Skip Unique constraints with same column list as
primary key.
Brent Robinson
brent.robinson at autodesk.com
Fri Jan 5 17:59:28 EST 2007
This submission modifies the ApplySchema command implementation, for
RDBMS providers, to skip adding unique constraints whose properties are
the identity properties of the class for the constraint. Such unique
constraints are redundant since the identity properties already
effectively form a unique constraint. They are also illegal in some
RDBMS's. Identity Properties are mapped onto primary key columns, and
Oracle disallows adding a unique constraint with the same columns as the
primary key.
The following unique constraints are ok and are not skipped:
- contain a subset of the identity properties
- contain some or all of the identity properties plus at
least one more class property.
In order to unit test the above, a fix for constraints read from a
config file was also applied. In this case, constraints are read from
both the config file and the RDBMS. A check was added to ensure that a
constraint isn't added to the LogicalPhysical schemas twice if it is in
both places.
Revision: 615
Author: brentrobinson
Date: 5:03:36 PM, Friday, January 05, 2007
Message:
Skip unique constraints that are identical to primary key
----
Modified :
/branches/3.2.x/Utilities/SchemaMgr/Inc/Sm/Lp/ClassDefinition.h
Modified :
/branches/3.2.x/Utilities/SchemaMgr/Inc/Sm/Lp/UniqueConstraint.h
Modified : /branches/3.2.x/Utilities/SchemaMgr/Inc/Sm/Ph/Table.h
Modified : /branches/3.2.x/Utilities/SchemaMgr/Nls/SmMessage.mc
Modified :
/branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Lp/ClassDefinition.cpp
Modified :
/branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Lp/UniqueConstraint.cpp
Modified : /branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Table.cpp
Revision: 605
Author: brentrobinson
Date: 5:04:52 PM, Friday, January 05, 2007
Message:
Skip unique constraints that are identical to primary key
----
Modified :
/branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchem
aTest.cpp
Modified :
/branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/SelectTests.c
pp
Modified :
/branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/UnitTestUtil.
cpp
Modified :
/branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/LogicalPhysicalBende
r.xslt
Modified :
/branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_MySql_m
aster.txt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo_issues/attachments/20070105/7476e6cb/attachment.html
More information about the Fdo_issues
mailing list