Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Database ends up with group when it is 1:m not n:m associations
Database ends up with group when it is 1:m not n:m associations [message #615471] Fri, 08 February 2008 17:56
David Wynter is currently offline David WynterFriend
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
Previous Topic:[CDO] UI repository browser
Next Topic:[CDO] Teneo/Hibernate integration
Goto Forum:
  


Current Time: Fri Apr 19 05:05:57 GMT 2024

Powered by FUDForum. Page generated in 0.01653 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top