 |
 |
 |
Hi all,
I'm having some trouble on generating strongly typed datasaets based on my
xml schema.
The schema is something like this(very simplified):
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Books" targetNamespace="http://tempuri.org/Books.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/Books.xsd"
xmlns:mstns="http://tempuri.org/Books.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Author">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" type="xs:int" />
<xs:element name="Name" type="xs:string" />
<xs:element name="Book">
<xs:complexType>
<xs:sequence>
<xs:element name="ISBN" type="xs:int" />
<xs:element name="Title" type="xs:string" />
<xs:element name="AuthorID" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:key name="AuthorKey1">
<xs:selector xpath="." />
<xs:field xpath="mstns:ID" />
</xs:key>
<xs:keyref name="AuthorBooks" refer="AuthorKey1">
<xs:selector xpath=".//mstns:Book" />
<xs:field xpath="mstns:AuthorID" />
</xs:keyref>
</xs:element>
</xs:schema>
Quickly explained, this is a table of authors and a childtable containing
the books of each author. I have used an unique ID to identify authors, which
is planned to act as a foreign key in the book table.
However, when I generate datasets using MSDataSetGenerator, an additional id
called Author_ID is added to the author table and used as a foreign key in
books. This way I lose a lot of control, as my relation(primary/foreign key)
is discarded.
Can anyone help me with this issue? I'll be glad to elaborate more if needed.
Regards,
Sven-Erik Nilsen
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |