This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 300111 - Platform should specify default sequence table
Summary: Platform should specify default sequence table
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-19 15:56 EST by Andrei Ilitchev CLA
Modified: 2022-06-09 10:25 EDT (History)
0 users

See Also:


Attachments
suggested patch. (9.33 KB, patch)
2010-01-19 16:17 EST, Andrei Ilitchev CLA
no flags Details | Diff
Corrected patch (8.07 KB, patch)
2010-01-19 16:27 EST, Andrei Ilitchev CLA
no flags Details | Diff
Slightly updated patch. (10.34 KB, patch)
2010-01-25 13:25 EST, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Ilitchev CLA 2010-01-19 15:56:05 EST
Currently the default table name defined in TableSequence:
    public static final String defaultTableName = "SEQUENCE";

Some database platforms (Symfoware) don't allow "SEQUENCE" to be used as a table name.
Therefore platform should provide default sequence table name.
Comment 1 Andrei Ilitchev CLA 2010-01-19 16:17:29 EST
Created attachment 156567 [details]
suggested patch.

Defined getDefaultSequenceTableName on DatabasePlatform;

Deprecate TabeSequence.defaultTableName - use an empty string instead, that will trigger usage of platform.getDefaultSequenceTableName();

Because onDisconnect(Platform) method is no longer does anything declared onDisconnect() and onConnect() as public - that allows to edit sequence after it has been connected (onDisconnect(), change, onConnect());

Fixed clone so that the returned sequence is always disconnected (no longer holds the platform of the original - note that it makes a difference only if the original sequence is connected).
Comment 2 Andrei Ilitchev CLA 2010-01-19 16:27:58 EST
Created attachment 156570 [details]
Corrected patch

Removed OraclePlatform that was mistakenly put into the original patch;
added a comment in TableSequence.
Comment 3 Andrei Ilitchev CLA 2010-01-25 13:25:37 EST
Created attachment 157146 [details]
Slightly updated patch.

DatabasePlatform.getSequenceTableName method called when the default sequence is disconnected and doesn't have table name defined returns defaultSequenceTableName defined on the platform;
Fixed SessionsXMLSchemaDefaultValueTest as pointed by Dies.
Comment 4 Andrei Ilitchev CLA 2010-01-25 14:04:14 EST
Checked the fix into trunk (2.1)
Reviewed by James
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:25:06 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink