Community
Participate
Working Groups
Build Identifier: I attached two patches in Bug 288715 to fix the bugs in the creation of Index. But bug 288715 is closed and may not get any attention. To get more attention ,this bug is opened. Reproducible: Always
Created attachment 171686 [details] Fix for the creation of DDL for Index There is a simple bug in the creation of DDL for Index. With the bug some DDLs would be missed in the DDL file.
Created attachment 171687 [details] Better way for creation and deletion of Index
For Symfoware all indexs should be deleted before "drop table <tableName>". While elements which are created by the old programme are dropped by the new one. It may cause some indexs would not be dropped before dropping table. So I think "drop table <tableName> cascade" may be a better way to drop table than "drop table <tableName>". Because with "cascade", even the indexs are not be dropped before, the table could be dropped prettily.
The patch seems incomplete. Do you have code that actually writes the SQL for cascade? (An updated SymfowarePlatform or other DatabasePlatform, for instance) Is the issue you are seeing due to a bug in EclipseLink, or is it because the schema has changed between the initial schema creation and the time it is dropped? I think an enhancement like this should be enabled by a property/some API, and not enabled by default.
(In reply to comment #4) > The patch seems incomplete. Do you have code that actually writes the SQL for > cascade? (An updated SymfowarePlatform or other DatabasePlatform, for > instance) My patches do not include the fix for "cascade". I am sorry, but actually I don't know how other databases support for "cascade". So it's hard for me to attach a patch for "cascade".
Can you provide some details of what the symptoms of the bug you are fixing are?
Setting target and priority. See the following page for details of the meanings of these: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Note bugs with submitted_patches and/or multiple votes will get revisited from time to time and can potentially jump the queue.
(In reply to comment #6) > Can you provide some details of what the symptoms of the bug you are fixing > are? Details of "cascade"? The "cascade" issue actually is not a bug, but an enhancement. Without "cascade", it seems that there also is no problem. In Symfoware's manual, it is said that all indexs of a table should be dropped before dropping the table without "cascade". But now the sql created for dropping index may miss something. Like this: [1] I am creating a JPA program. The program has a Entity "Person", the attribute named "name" of which is unique. [2] Test it in SE with "drop and create". [3] I remove the unique for "name", because I find men with the same name are possible. [4] Test it again. The index created in [2] for "name" do not be dropped in [4] before dropping table, because "name" is not unique in [4].
FYI: GlassFish deals with this issue by using our sql-script ddl-generation option and saves the file with the drop statements in it. It then executes the saved file when the persistence unit is redeployed. How does the behavior change with your patch?
(In reply to comment #9) > How does the behavior change with your patch? My pathes do nothing for "cascade". (see Comment 5) My first attachment (id=171686) is to fix a bug. With the bug, some SQLs for creating indexs would not be writted into the DDL file. My second attachment (id=171687) is not a fix, just an enhancement. It makes the code for creation and deletion of indexs more clear and understandable.
Created attachment 172124 [details] Amalgamated Patch
Added both patches. Tested Index issue by manually inspecting the ddl. Tested both patches with Core and JPA LRG Reviewed by: Tom Ware - reviewed community supported fix Setting target to 2.1.1 and priority to P1 so fix will be migrated to 2.1.1 when the stream opens
I am not porting this to 2.1.1. The changes to interface and the dropping of methods is concerning in a patch release. Fine for trunk. (2.2.0)
fixing ipLog flag
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink