Database ends up with group when it is 1:m not n:m associations [message #615471] |
Fri, 08 February 2008 17:56 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
Hi,
The schema I am using has a particular approach to minimise the size of
XML messages.
Here is a small excerpt
<xsd:complexType name="InstrumentDomain">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" ref="mddl:when" />
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element ref="mddl:agencyRankings" />
</xsd:choice>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element ref="mddl:agencyRatings" />
</xsd:choice>
....
etc.
I end up with
PKTABLE_NAME PKCOLUMN_NAME FKTABLE_NAME FKCOLUMN_NAME
agencyratings id instrumentdomain_group group_agencyratings
in the database generated.
The real world model here is that instrumentDomain has a 1:1
relationship with agencyRankings and agencyRatings. Is the generation
of a group table and the inclusion of these entities due to the fact
they used a xsd:sequence with xsd:choice inside it? I assume the
maxOccurs="1" are not being taken into account.
Is there a way of changing the generated output to accommodate these
maxOccur"1" within the xsd:choice? Or is the XSD model structure going
to force the creation of the n:m group?
Thx,
David
|
|
|
Powered by
FUDForum. Page generated in 0.24569 seconds