Table naming conventions [message #112268] |
Tue, 12 February 2008 04:31  |
Eclipse User |
|
|
|
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 05:46  |
Eclipse User |
|
|
|
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 05:46  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03553 seconds