Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Latest build Teneo, backward compatibility
Latest build Teneo, backward compatibility [message #90595] Wed, 18 July 2007 21:30 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
This new build of Teneo solves a number of issues (see the release notes).

One change is important for backward compatability: the way Teneo truncates long sql names has been
improved. This change means that sql (table and column) generated by Teneo can differ from previous
versions. This difference only applies in case the maximum sql name length option was set and table
or column names are too long. In this case please check out this bugzilla for hints on how to retain
backward compatability:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=196951

Related to this a new default naming strategy is now used, see here:
http://www.elver.org/hibernate/extensions.html#TeneoSQLNameS trategy+%28default%29

Other changes:
- Handling of composite ids has been improved.
- A new option has been added which allows you to specify the complete path to a hbm file including
its filename.
- comments in the model are now reflected in the hbm file

The last two changes are based on contributions by Jason Henriksen.

--

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: Latest build Teneo, backward compatibility [message #90677 is a reply to message #90595] Thu, 19 July 2007 10:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benjamin.cabeNOSPAMM.anyware-tech.DOTcom

Hi Martin,

TeneoSQLNameStrategy looks just great ; my columns now have very
understandable names !..

However, I just opened the bug #197110, tell me if you think it's worth
trying to make this enhancement ....
It could also be interesting to change the way the loop through "aeiou"
is done to not remove all A's then all E's etc. but, instead, every
vowel one after another ...

Regards,
Benjamin.

Martin Taal a écrit :
> This new build of Teneo solves a number of issues (see the release notes).
>
> One change is important for backward compatability: the way Teneo
> truncates long sql names has been improved. This change means that sql
> (table and column) generated by Teneo can differ from previous versions.
> This difference only applies in case the maximum sql name length option
> was set and table or column names are too long. In this case please
> check out this bugzilla for hints on how to retain backward compatability:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=196951
>
> Related to this a new default naming strategy is now used, see here:
> http://www.elver.org/hibernate/extensions.html#TeneoSQLNameS trategy+%28default%29
Re: Latest build Teneo, backward compatibility [message #90690 is a reply to message #90677] Thu, 19 July 2007 10:55 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Benjamin,
Yes your bugzilla is valid. I agree that not-removing the first vowel makes it more readable (I
found that approach also on the internet at oracle).

With the other remark, do you mean that instead of this loop:
for (String vowel : vowels) {
while (not yet finished) {
remove one occurence of vowel
if (finished) goaway
}
}

it should do this:
while (not yet finished) {
for (String vowel : vowels) {
remove one occurence of vowel
if (finished) goaway
}
}

If you mean this then I think that either approach is valid. Just let me know what are the arguments
for the other approach.
There should be some literature on the internet which says what gives most readable results (I only
found removing vowels in general but no discussion on other strategies, like first remove u then o
etc.).

Btw, it is easy to plugin your own naming strategy, so you can try different approaches yourselve.
You just need to do this before you initialize the datastore:
dataStore.getExtensionManager().registerExtension(SQLNameStr ategy.class.getName(),
MyGreatNamingStrategy.class.getName()));

(were MyGreatNamingStrategy extends the TeneoSQLNameStrategy and overrides the trunc method)

gr. Martin

Benjamin CABE wrote:
> Hi Martin,
>
> TeneoSQLNameStrategy looks just great ; my columns now have very
> understandable names !..
>
> However, I just opened the bug #197110, tell me if you think it's worth
> trying to make this enhancement ....
> It could also be interesting to change the way the loop through "aeiou"
> is done to not remove all A's then all E's etc. but, instead, every
> vowel one after another ...
>
> Regards,
> Benjamin.
>
> Martin Taal a écrit :
>> This new build of Teneo solves a number of issues (see the release
>> notes).
>>
>> One change is important for backward compatability: the way Teneo
>> truncates long sql names has been improved. This change means that sql
>> (table and column) generated by Teneo can differ from previous
>> versions. This difference only applies in case the maximum sql name
>> length option was set and table or column names are too long. In this
>> case please check out this bugzilla for hints on how to retain
>> backward compatability:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=196951
>>
>> Related to this a new default naming strategy is now used, see here:
>> http://www.elver.org/hibernate/extensions.html#TeneoSQLNameS trategy+%28default%29
>


--

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: Latest build Teneo, backward compatibility [message #90793 is a reply to message #90690] Thu, 19 July 2007 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benjamin.cabeNOSPAMM.anyware-tech.DOTcom

Martin Taal a écrit :

> Yes your bugzilla is valid. I agree that not-removing the first vowel
> makes it more readable (I found that approach also on the internet at
> oracle).

OK, I'll post the (trivial ;) ) fix, then.

>
> With the other remark, do you mean that instead of this loop:
> for (String vowel : vowels) {
> while (not yet finished) {
> remove one occurence of vowel
> if (finished) goaway
> }
> }
>
> it should do this:
> while (not yet finished) {
> for (String vowel : vowels) {
> remove one occurence of vowel
> if (finished) goaway
> }
> }
>
> If you mean this then I think that either approach is valid. Just let me
> know what are the arguments for the other approach.


Yes it is what I meant. In fact, there's no particular argument; all the
more I didn't noticed you've used a specific order for the vowels
("uoaei") according to their importance I presume. It might be enough
for the "generic" TeneoSQLNameStrategy.


> Btw, it is easy to plugin your own naming strategy, so you can try
> different approaches yourselve. You just need to do this before you
> initialize the datastore:
> dataStore.getExtensionManager().registerExtension(SQLNameStr ategy.class.getName(),
> MyGreatNamingStrategy.class.getName()));
>
> (were MyGreatNamingStrategy extends the TeneoSQLNameStrategy and
> overrides the trunc method)

Yes I noticed that already. Simply great :)


Just a last point : don't you think MAXIMUM_SQL_NAME_LENGTH should have
a lower limit (1 would be the bare minimum, even if it's pretty hard to
imagine someone setting MAXIMUM_SQL_NAME_LENGTH to 0 or 1 ;-) )



Regards,
Benjamin.
Re: Latest build Teneo, backward compatibility [message #91080 is a reply to message #90793] Fri, 20 July 2007 09:45 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I have added a check on max sql name length, if it is zero an exception is thrown as the mapping
file will get empty column/table names.

If it is lower than 4 a warning is logged.

gr. Martin

Benjamin CABE wrote:
> Martin Taal a écrit :
>
>> Yes your bugzilla is valid. I agree that not-removing the first vowel
>> makes it more readable (I found that approach also on the internet at
>> oracle).
>
> OK, I'll post the (trivial ;) ) fix, then.
>
>>
>> With the other remark, do you mean that instead of this loop:
>> for (String vowel : vowels) {
>> while (not yet finished) {
>> remove one occurence of vowel
>> if (finished) goaway
>> }
>> }
>>
>> it should do this:
>> while (not yet finished) {
>> for (String vowel : vowels) {
>> remove one occurence of vowel
>> if (finished) goaway
>> }
>> }
>>
>> If you mean this then I think that either approach is valid. Just let
>> me know what are the arguments for the other approach.
>
>
> Yes it is what I meant. In fact, there's no particular argument; all the
> more I didn't noticed you've used a specific order for the vowels
> ("uoaei") according to their importance I presume. It might be enough
> for the "generic" TeneoSQLNameStrategy.
>
>
>> Btw, it is easy to plugin your own naming strategy, so you can try
>> different approaches yourselve. You just need to do this before you
>> initialize the datastore:
>> dataStore.getExtensionManager().registerExtension(SQLNameStr ategy.class.getName(),
>> MyGreatNamingStrategy.class.getName()));
>>
>> (were MyGreatNamingStrategy extends the TeneoSQLNameStrategy and
>> overrides the trunc method)
>
> Yes I noticed that already. Simply great :)
>
>
> Just a last point : don't you think MAXIMUM_SQL_NAME_LENGTH should have
> a lower limit (1 would be the bare minimum, even if it's pretty hard to
> imagine someone setting MAXIMUM_SQL_NAME_LENGTH to 0 or 1 ;-) )
>
>
>
> Regards,
> Benjamin.


--

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: Latest build Teneo, backward compatibility [message #608805 is a reply to message #90595] Thu, 19 July 2007 10:38 Go to previous message
Eclipse UserFriend
Originally posted by: benjamin.cabeNOSPAMM.anyware-tech.DOTcom

Hi Martin,

TeneoSQLNameStrategy looks just great ; my columns now have very
understandable names !..

However, I just opened the bug #197110, tell me if you think it's worth
trying to make this enhancement ....
It could also be interesting to change the way the loop through "aeiou"
is done to not remove all A's then all E's etc. but, instead, every
vowel one after another ...

Regards,
Benjamin.

Martin Taal a écrit :
> This new build of Teneo solves a number of issues (see the release notes).
>
> One change is important for backward compatability: the way Teneo
> truncates long sql names has been improved. This change means that sql
> (table and column) generated by Teneo can differ from previous versions.
> This difference only applies in case the maximum sql name length option
> was set and table or column names are too long. In this case please
> check out this bugzilla for hints on how to retain backward compatability:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=196951
>
> Related to this a new default naming strategy is now used, see here:
> http://www.elver.org/hibernate/extensions.html#TeneoSQLNameS trategy+%28default%29
Re: Latest build Teneo, backward compatibility [message #608806 is a reply to message #90677] Thu, 19 July 2007 10:55 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Benjamin,
Yes your bugzilla is valid. I agree that not-removing the first vowel makes it more readable (I
found that approach also on the internet at oracle).

With the other remark, do you mean that instead of this loop:
for (String vowel : vowels) {
while (not yet finished) {
remove one occurence of vowel
if (finished) goaway
}
}

it should do this:
while (not yet finished) {
for (String vowel : vowels) {
remove one occurence of vowel
if (finished) goaway
}
}

If you mean this then I think that either approach is valid. Just let me know what are the arguments
for the other approach.
There should be some literature on the internet which says what gives most readable results (I only
found removing vowels in general but no discussion on other strategies, like first remove u then o
etc.).

Btw, it is easy to plugin your own naming strategy, so you can try different approaches yourselve.
You just need to do this before you initialize the datastore:
dataStore.getExtensionManager().registerExtension(SQLNameStr ategy.class.getName(),
MyGreatNamingStrategy.class.getName()));

(were MyGreatNamingStrategy extends the TeneoSQLNameStrategy and overrides the trunc method)

gr. Martin

Benjamin CABE wrote:
> Hi Martin,
>
> TeneoSQLNameStrategy looks just great ; my columns now have very
> understandable names !..
>
> However, I just opened the bug #197110, tell me if you think it's worth
> trying to make this enhancement ....
> It could also be interesting to change the way the loop through "aeiou"
> is done to not remove all A's then all E's etc. but, instead, every
> vowel one after another ...
>
> Regards,
> Benjamin.
>
> Martin Taal a écrit :
>> This new build of Teneo solves a number of issues (see the release
>> notes).
>>
>> One change is important for backward compatability: the way Teneo
>> truncates long sql names has been improved. This change means that sql
>> (table and column) generated by Teneo can differ from previous
>> versions. This difference only applies in case the maximum sql name
>> length option was set and table or column names are too long. In this
>> case please check out this bugzilla for hints on how to retain
>> backward compatability:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=196951
>>
>> Related to this a new default naming strategy is now used, see here:
>> http://www.elver.org/hibernate/extensions.html#TeneoSQLNameS trategy+%28default%29
>


--

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: Latest build Teneo, backward compatibility [message #608813 is a reply to message #90690] Thu, 19 July 2007 12:44 Go to previous message
Eclipse UserFriend
Originally posted by: benjamin.cabeNOSPAMM.anyware-tech.DOTcom

Martin Taal a écrit :

> Yes your bugzilla is valid. I agree that not-removing the first vowel
> makes it more readable (I found that approach also on the internet at
> oracle).

OK, I'll post the (trivial ;) ) fix, then.

>
> With the other remark, do you mean that instead of this loop:
> for (String vowel : vowels) {
> while (not yet finished) {
> remove one occurence of vowel
> if (finished) goaway
> }
> }
>
> it should do this:
> while (not yet finished) {
> for (String vowel : vowels) {
> remove one occurence of vowel
> if (finished) goaway
> }
> }
>
> If you mean this then I think that either approach is valid. Just let me
> know what are the arguments for the other approach.


Yes it is what I meant. In fact, there's no particular argument; all the
more I didn't noticed you've used a specific order for the vowels
("uoaei") according to their importance I presume. It might be enough
for the "generic" TeneoSQLNameStrategy.


> Btw, it is easy to plugin your own naming strategy, so you can try
> different approaches yourselve. You just need to do this before you
> initialize the datastore:
> dataStore.getExtensionManager().registerExtension(SQLNameStr ategy.class.getName(),
> MyGreatNamingStrategy.class.getName()));
>
> (were MyGreatNamingStrategy extends the TeneoSQLNameStrategy and
> overrides the trunc method)

Yes I noticed that already. Simply great :)


Just a last point : don't you think MAXIMUM_SQL_NAME_LENGTH should have
a lower limit (1 would be the bare minimum, even if it's pretty hard to
imagine someone setting MAXIMUM_SQL_NAME_LENGTH to 0 or 1 ;-) )



Regards,
Benjamin.
Re: Latest build Teneo, backward compatibility [message #608832 is a reply to message #90793] Fri, 20 July 2007 09:45 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I have added a check on max sql name length, if it is zero an exception is thrown as the mapping
file will get empty column/table names.

If it is lower than 4 a warning is logged.

gr. Martin

Benjamin CABE wrote:
> Martin Taal a écrit :
>
>> Yes your bugzilla is valid. I agree that not-removing the first vowel
>> makes it more readable (I found that approach also on the internet at
>> oracle).
>
> OK, I'll post the (trivial ;) ) fix, then.
>
>>
>> With the other remark, do you mean that instead of this loop:
>> for (String vowel : vowels) {
>> while (not yet finished) {
>> remove one occurence of vowel
>> if (finished) goaway
>> }
>> }
>>
>> it should do this:
>> while (not yet finished) {
>> for (String vowel : vowels) {
>> remove one occurence of vowel
>> if (finished) goaway
>> }
>> }
>>
>> If you mean this then I think that either approach is valid. Just let
>> me know what are the arguments for the other approach.
>
>
> Yes it is what I meant. In fact, there's no particular argument; all the
> more I didn't noticed you've used a specific order for the vowels
> ("uoaei") according to their importance I presume. It might be enough
> for the "generic" TeneoSQLNameStrategy.
>
>
>> Btw, it is easy to plugin your own naming strategy, so you can try
>> different approaches yourselve. You just need to do this before you
>> initialize the datastore:
>> dataStore.getExtensionManager().registerExtension(SQLNameStr ategy.class.getName(),
>> MyGreatNamingStrategy.class.getName()));
>>
>> (were MyGreatNamingStrategy extends the TeneoSQLNameStrategy and
>> overrides the trunc method)
>
> Yes I noticed that already. Simply great :)
>
>
> Just a last point : don't you think MAXIMUM_SQL_NAME_LENGTH should have
> a lower limit (1 would be the bare minimum, even if it's pretty hard to
> imagine someone setting MAXIMUM_SQL_NAME_LENGTH to 0 or 1 ;-) )
>
>
>
> Regards,
> Benjamin.


--

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:[Teneo] too long comment
Next Topic:[Teneo] too long comment
Goto Forum:
  


Current Time: Fri Aug 12 12:40:36 GMT 2022

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

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

Back to the top