Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] Problem with enforce unique names(Too long names of tables)
[Texo] Problem with enforce unique names [message #876808] Fri, 25 May 2012 10:03 Go to next message
Olaf Burdziakowski is currently offline Olaf BurdziakowskiFriend
Messages: 46
Registered: April 2012
Member
I tested my application with Hibernate connected to MySql. Now I need to attach to Oracle. The problem is:
ORACLE limit table name to 31 characters ....
So I need to make table names shorter.
I work with several packages and to make entity names unique I had to add in annotations option: "enforce unique names"=true.
Now the Entity names are combined with package name. But table names also...
Example:
@Entity(name = "batchconfig_BatchConfigType")
@Table(name = "DPL_batchconfig_BatchConfigType")
public class BatchConfigType extends Identifiable {

So my table name become very long.
I would like:
or 1. Prefix of table where added to Entity name then do not have to select the "enforce unique names"=true.
or 2. Option "enforce unique names"=true do not add prefix to table name

Both cases may be with additional checkbox if needed

Now I have to change names of my packages to make table names shorter ;(
Re: [Texo] Problem with enforce unique names [message #876818 is a reply to message #876808] Fri, 25 May 2012 10:18 Go to previous messageGo to next message
Olaf Burdziakowski is currently offline Olaf BurdziakowskiFriend
Messages: 46
Registered: April 2012
Member
Is it possible to remove postfix "Type" from table name (as general annotation not each class separately)?
Re: [Texo] Problem with enforce unique names [message #876825 is a reply to message #876818] Fri, 25 May 2012 10:36 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Olaf,
There is another option on the EPackage ORM annotation: maximumSqlNameLength
set this one to 30 then it should work, your table names will be a bit less readable though...

gr. Martin

On 05/25/2012 12:18 PM, Olaf Burdziakowski wrote:
> Is it possible to remove postfix "Type" from table name (as general annotation not each class separately)?


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] Problem with enforce unique names [message #876857 is a reply to message #876825] Fri, 25 May 2012 11:57 Go to previous message
Olaf Burdziakowski is currently offline Olaf BurdziakowskiFriend
Messages: 46
Registered: April 2012
Member
@Martin,
thank you for hint. This works. The only issue is:
- can package name be shorten always the same?

I would like to have tables from the same package with the same prefix.
Example (of different names):
DPL_CNFIGXTNSIN_CMPNENTGRPTYPE
DPL_CNFIGXTENSIN_PCKETLBELTYPE

Texo to keep the same length compress the same prefix to different names. Can it be somehow normalized? Example to:
DPL_CNFIGXTNSIN_ (shorter) for all tables in the same package?
Previous Topic:Connection between EMFStore server and client
Next Topic:[Texo] ignore not null syntax
Goto Forum:
  


Current Time: Thu Apr 25 01:20:40 GMT 2024

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

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

Back to the top