Bug 417378 - dropping foreign key instead of index
Summary: dropping foreign key instead of index
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-16 17:50 EDT by Miloslav Faltan CLA
Modified: 2022-06-09 10:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Faltan CLA 2013-09-16 17:50:27 EDT
I got following unique constraints defined on table:

@Table(uniqueConstraints = {
		@UniqueConstraint(columnNames = {
				"COUNTRY_ID",
				"COMPANYREGISTRATIONNUMBER" }),
		@UniqueConstraint(columnNames = {
				"COUNTRY_ID",
				"TAXNUMBER" }),
		@UniqueConstraint(columnNames = {
				"COUNTRY_ID",
				"COMMERCIALREGISTER" }),
		@UniqueConstraint(columnNames = {
				"COUNTRY_ID",
				"REGISTERNUMBER" }) })

When I try to generate tables using mysql connector 5.1.26, from my model, these drop statements are generated:
ALTER TABLE PARTNER DROP FOREIGN KEY UNQ_PARTNER_0
instead of
ALTER TABLE PARTNER DROP INDEX UNQ_PARTNER_0

the same for _1, _2 and _3
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:05:44 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink