Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Table naming conventions
Table naming conventions [message #112268] Tue, 12 February 2008 09:31 Go to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Martin,

The XSD I am using has a naming convention where a element is allowed
children. e.g.

<xsd:group name="Denomination.children">
<xsd:choice>
<xsd:element ref="gensec:calculationType" />
<xsd:element ref="gensec:dateTime" />
<xsd:element ref="gensec:fraction" />
<xsd:element ref="gensec:fractionHandlingType" />
<xsd:element ref="gensec:indicatorsType" />
<xsd:element ref="gensec:marketCenter" />
<xsd:element ref="gensec:multiplier" />
<xsd:element ref="gensec:previousDateTime" />
<xsd:element ref="gensec:quantityDescriptionType" />
<xsd:element ref="gensec:quantityType" />
<xsd:element ref="gensec:valuationRef" />
<xsd:element ref="gensec:valuationType" />
<xsd:element ref="gensec:crossrate" />
<xsd:element ref="gensec:currency" />
<xsd:element ref="gensec:size" />
<xsd:element ref="gensec:increment" />
<xsd:element ref="gensec:minVal" />
</xsd:choice>
</xsd:group>
<xsd:complexType name="Denomination">
<xsd:sequence minOccurs="0" maxOccurs="1">
<xsd:element ref="gensec:mdDecimal" />
<xsd:group minOccurs="0" maxOccurs="unbounded"
ref="gensec:Denomination.children" />
<xsd:element minOccurs="0" maxOccurs="1" ref="gensec:source" />
<xsd:element minOccurs="0" maxOccurs="1" ref="gensec:other" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID" use="optional" />
</xsd:complexType>
<xsd:element name="denomination" type="gensec:Denomination" />


The problem with this is that they have already allowed for the naming
of the child elements, so when you apply your standard table naming and
column naming rules we end up with very long names with redundant name
parts. We also challenge quest for meaningful names when Oracle impose a
30 char limit to column, table, index etc names.

Is there a way I can control the naming of tables? Even if I have to
hack the code to do so it will be worth it for me, so pointers to the
files I should look at will be helpful.

Regards,

David
Re: Table naming conventions [message #112280 is a reply to message #112268] Tue, 12 February 2008 10:46 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi David,
Can you check this:
http://www.elver.org/hibernate/extensions.html#SqlNameStrate gy+ExtensionPoint%0A%09%09%09%09%28org.eclipse.emf.teneo.map ping.strategy.SQLNameStrategy%29

Let me know if it does (not) work for you.

There is also the Table annotation but this won't work for groups.

gr. Martin

david wrote:
> Martin,
>
> The XSD I am using has a naming convention where a element is allowed
> children. e.g.
>
> <xsd:group name="Denomination.children">
> <xsd:choice>
> <xsd:element ref="gensec:calculationType" />
> <xsd:element ref="gensec:dateTime" />
> <xsd:element ref="gensec:fraction" />
> <xsd:element ref="gensec:fractionHandlingType" />
> <xsd:element ref="gensec:indicatorsType" />
> <xsd:element ref="gensec:marketCenter" />
> <xsd:element ref="gensec:multiplier" />
> <xsd:element ref="gensec:previousDateTime" />
> <xsd:element ref="gensec:quantityDescriptionType" />
> <xsd:element ref="gensec:quantityType" />
> <xsd:element ref="gensec:valuationRef" />
> <xsd:element ref="gensec:valuationType" />
> <xsd:element ref="gensec:crossrate" />
> <xsd:element ref="gensec:currency" />
> <xsd:element ref="gensec:size" />
> <xsd:element ref="gensec:increment" />
> <xsd:element ref="gensec:minVal" />
> </xsd:choice>
> </xsd:group>
> <xsd:complexType name="Denomination">
> <xsd:sequence minOccurs="0" maxOccurs="1">
> <xsd:element ref="gensec:mdDecimal" />
> <xsd:group minOccurs="0" maxOccurs="unbounded"
> ref="gensec:Denomination.children" />
> <xsd:element minOccurs="0" maxOccurs="1" ref="gensec:source" />
> <xsd:element minOccurs="0" maxOccurs="1" ref="gensec:other" />
> </xsd:sequence>
> <xsd:attribute name="id" type="xsd:ID" use="optional" />
> </xsd:complexType>
> <xsd:element name="denomination" type="gensec:Denomination" />
>
>
> The problem with this is that they have already allowed for the naming
> of the child elements, so when you apply your standard table naming and
> column naming rules we end up with very long names with redundant name
> parts. We also challenge quest for meaningful names when Oracle impose a
> 30 char limit to column, table, index etc names.
>
> Is there a way I can control the naming of tables? Even if I have to
> hack the code to do so it will be worth it for me, so pointers to the
> files I should look at will be helpful.
>
> Regards,
>
> David
Hi

--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Table naming conventions [message #615492 is a reply to message #112268] Tue, 12 February 2008 10:46 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi David,
Can you check this:
http://www.elver.org/hibernate/extensions.html#SqlNameStrate gy+ExtensionPoint%0A%09%09%09%09%28org.eclipse.emf.teneo.map ping.strategy.SQLNameStrategy%29

Let me know if it does (not) work for you.

There is also the Table annotation but this won't work for groups.

gr. Martin

david wrote:
> Martin,
>
> The XSD I am using has a naming convention where a element is allowed
> children. e.g.
>
> <xsd:group name="Denomination.children">
> <xsd:choice>
> <xsd:element ref="gensec:calculationType" />
> <xsd:element ref="gensec:dateTime" />
> <xsd:element ref="gensec:fraction" />
> <xsd:element ref="gensec:fractionHandlingType" />
> <xsd:element ref="gensec:indicatorsType" />
> <xsd:element ref="gensec:marketCenter" />
> <xsd:element ref="gensec:multiplier" />
> <xsd:element ref="gensec:previousDateTime" />
> <xsd:element ref="gensec:quantityDescriptionType" />
> <xsd:element ref="gensec:quantityType" />
> <xsd:element ref="gensec:valuationRef" />
> <xsd:element ref="gensec:valuationType" />
> <xsd:element ref="gensec:crossrate" />
> <xsd:element ref="gensec:currency" />
> <xsd:element ref="gensec:size" />
> <xsd:element ref="gensec:increment" />
> <xsd:element ref="gensec:minVal" />
> </xsd:choice>
> </xsd:group>
> <xsd:complexType name="Denomination">
> <xsd:sequence minOccurs="0" maxOccurs="1">
> <xsd:element ref="gensec:mdDecimal" />
> <xsd:group minOccurs="0" maxOccurs="unbounded"
> ref="gensec:Denomination.children" />
> <xsd:element minOccurs="0" maxOccurs="1" ref="gensec:source" />
> <xsd:element minOccurs="0" maxOccurs="1" ref="gensec:other" />
> </xsd:sequence>
> <xsd:attribute name="id" type="xsd:ID" use="optional" />
> </xsd:complexType>
> <xsd:element name="denomination" type="gensec:Denomination" />
>
>
> The problem with this is that they have already allowed for the naming
> of the child elements, so when you apply your standard table naming and
> column naming rules we end up with very long names with redundant name
> parts. We also challenge quest for meaningful names when Oracle impose a
> 30 char limit to column, table, index etc names.
>
> Is there a way I can control the naming of tables? Even if I have to
> hack the code to do so it will be worth it for me, so pointers to the
> files I should look at will be helpful.
>
> Regards,
>
> David
Hi

--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:Table naming conventions
Next Topic:[Announce] EMFT SEARCH 0.7.0 I200802121916 is available
Goto Forum:
  


Current Time: Fri Apr 26 14:00:49 GMT 2024

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

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

Back to the top