|
Re: [Teneo] Error with generated FK name, name too long [message #82190 is a reply to message #82090] |
Sun, 06 May 2007 13:40  |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Alain,
Currently Teneo does not generate the foreign-key name this is done by hibernate.
Please enter a bugzilla for this (with the addition that the fk-naming should be customizable).
gr. Martin.
Alain Picard wrote:
> Martin,
>
> I am getting the following errors when trying to get one of my ecore
> model initialized with the table_per_class strategy:
>
> SchemaUpdate.java: 155 : Unsuccessful: alter table `xmlall` add index
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> (`modelelement_stereotype_e_id`), add constraint
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> foreign key (`modelelement_stereotype_e_id`) references `stereotype` (e_id)
> ERROR [04 May 2007 09:50] SchemaUpdate.java: 155 : Unsuccessful: alter
> table `xmlall` add index
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> (`modelelement_stereotype_e_id`), add constraint
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> foreign key (`modelelement_stereotype_e_id`) references `stereotype` (e_id)
> ERROR [04 May 2007 09:50] SchemaUpdate.java: 156 : Identifier name
> 'FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2 f81e2a' is
> too long
> ERROR [04 May 2007 09:50] SchemaUpdate.java: 156 : Identifier name
> 'FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2 f81e2a' is
> too long
>
> I saw a method in PersistenceOptions, getMaximumSqlNameLength, would
> that help avoid this?
>
> Also is there possible to implement a different naming strategy for FK
> names that would be more meaningful?
>
> Thanks
> Alain
--
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: [Teneo] Error with generated FK name, name too long [message #605311 is a reply to message #82090] |
Sun, 06 May 2007 13:40  |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Alain,
Currently Teneo does not generate the foreign-key name this is done by hibernate.
Please enter a bugzilla for this (with the addition that the fk-naming should be customizable).
gr. Martin.
Alain Picard wrote:
> Martin,
>
> I am getting the following errors when trying to get one of my ecore
> model initialized with the table_per_class strategy:
>
> SchemaUpdate.java: 155 : Unsuccessful: alter table `xmlall` add index
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> (`modelelement_stereotype_e_id`), add constraint
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> foreign key (`modelelement_stereotype_e_id`) references `stereotype` (e_id)
> ERROR [04 May 2007 09:50] SchemaUpdate.java: 155 : Unsuccessful: alter
> table `xmlall` add index
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> (`modelelement_stereotype_e_id`), add constraint
> FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2f 81e2a
> foreign key (`modelelement_stereotype_e_id`) references `stereotype` (e_id)
> ERROR [04 May 2007 09:50] SchemaUpdate.java: 156 : Identifier name
> 'FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2 f81e2a' is
> too long
> ERROR [04 May 2007 09:50] SchemaUpdate.java: 156 : Identifier name
> 'FK315EF3B3B4B9A2E8c5350b174b5c68cd4745c1713725705c4ee2773d2 f81e2a' is
> too long
>
> I saw a method in PersistenceOptions, getMaximumSqlNameLength, would
> that help avoid this?
>
> Also is there possible to implement a different naming strategy for FK
> names that would be more meaningful?
>
> Thanks
> Alain
--
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.56253 seconds