2006-07-11 Senganal T <tsenganal@novell.com>
authorSenganal T <senga@mono-cvs.ximian.com>
Tue, 11 Jul 2006 14:35:01 +0000 (14:35 -0000)
committerSenganal T <senga@mono-cvs.ximian.com>
Tue, 11 Jul 2006 14:35:01 +0000 (14:35 -0000)
commita6010f5dc336b52b859c78ac0c2d618fa3cdcf9b
treebbd31e90b37837d0ed172566eb4fb52e9963efe8
parent4d93c37e6ea1937c00148b9a05b88ccfadc47576
2006-07-11  Senganal T <tsenganal@novell.com>

* Test/System.Data/schemas/test017.xsd : test if Relations and columns are
created correctly if schema is nested but relation is not.

* Test/System.Data/DataSetTest2.cs : Added tests for DataSet.WriteXmlSchema and
ReadXmlSchema methods to test nested schemas.
Also tests for bug #78810.

* System.Data/XmlSchemaWriter.cs :
- WriteTableType : If Relation.Nested is true, then nest the
table schemas. Correct the xml to add the table element within
the <Sequence> element.
- WriteChildRelations : Correct the Xml element name and
attributes. Close the attribute correctly.
* System.Data/XmlSchemaDataImporter.cs :
- GenerateRelationship : When creating the relations, if
ParentColumn exists but Corr ChildCol is null, create a child
Column with the same name and type as the parent column.
- Renamed DataSetDefinesPrimaryKey to DataSetDefinesKey
- DataSetDefinesKey : if either xsd:key or xsd:keyref is
defined for the dataset, do not manually create the relations.
fixes bug #78810
- AddParentKeyColumn : if Columnname already exists, use
colname_0 instead of throwing an exception.
- FillDataColumnRepeatedSimpleElement : Do not set the Unique
value as it creates a constraint by default. The unique value
is automatically set when pk is set.
- CreateChildColumns : Added. Creates a ChildColumn duplicating
ParentColumn properties.

svn path=/trunk/mcs/; revision=62443
mcs/class/System.Data/System.Data/ChangeLog
mcs/class/System.Data/System.Data/XmlSchemaDataImporter.cs
mcs/class/System.Data/System.Data/XmlSchemaWriter.cs
mcs/class/System.Data/Test/System.Data/ChangeLog
mcs/class/System.Data/Test/System.Data/DataSetTest2.cs
mcs/class/System.Data/Test/System.Data/schemas/ChangeLog
mcs/class/System.Data/Test/System.Data/schemas/test017.xsd [new file with mode: 0644]