Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 288715 - Add Symfoware Database Platform
Summary: Add Symfoware Database Platform
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 289163 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-06 22:45 EDT by Dies Koper CLA
Modified: 2022-06-09 10:22 EDT (History)
3 users (show)

See Also:


Attachments
initial implementation (36.50 KB, patch)
2009-09-15 09:48 EDT, Dies Koper CLA
no flags Details | Diff
changes to EclipseLink common code for Symfoware platform (80.19 KB, patch)
2009-09-15 10:19 EDT, Dies Koper CLA
no flags Details | Diff
fixes column precision/length issues in Foundation tests (4.84 KB, patch)
2009-10-21 04:32 EDT, Dies Koper CLA
no flags Details | Diff
current state of your code that attempts to create a traditional JOIN query (6.13 KB, patch)
2009-10-23 22:28 EDT, Dies Koper CLA
no flags Details | Diff
fixes issues where SEQUENCE is used as table or column name in Foundation/core tests (3.05 KB, patch)
2009-10-23 22:37 EDT, Dies Koper CLA
no flags Details | Diff
adds sizes to BLOB tests in Foundation/core (obsoletes part of 150075) (2.52 KB, patch)
2009-10-23 22:44 EDT, Dies Koper CLA
no flags Details | Diff
address various issues in foundation and jpa code and tests for Symfoware (17.14 KB, patch)
2009-12-14 02:33 EST, Dies Koper CLA
no flags Details | Diff
same as the previous patch, without the changes to DatabaseCall.java and DatabaseAccessor.java (12.96 KB, patch)
2009-12-17 02:31 EST, Dies Koper CLA
no flags Details | Diff
changes to source to try to find out where default table sequences get their table name "SEQUENCE" from (12.11 KB, patch)
2009-12-17 06:38 EST, Dies Koper CLA
no flags Details | Diff
fixes issues for incorrect sequence generator names, column length/precision/type issues, avoiding UpdateAll/DeleteAll queries in set-up code, FAST table creation fixes (80.72 KB, patch)
2010-01-11 08:13 EST, Dies Koper CLA
no flags Details | Diff
patch to allow FirstRow and Max to be set independently (12.87 KB, patch)
2010-01-22 10:06 EST, Dies Koper CLA
no flags Details | Diff
complete set of changes for Symfoware; passed Core and JPA SRGs (277.31 KB, patch)
2010-01-26 09:36 EST, Dies Koper CLA
no flags Details | Diff
complete set of changes for Symfoware (prev. patch was corrupted) (276.68 KB, patch)
2010-01-26 17:39 EST, Dies Koper CLA
no flags Details | Diff
Updated patch to generalize some changes in the previous patch (207.51 KB, application/octet-stream)
2010-02-11 15:25 EST, Tom Ware CLA
no flags Details
updated previous patch to illustrate fix for fastTableCreator, and added fix for INNEr JOIN issue for review (56.26 KB, patch)
2010-02-12 08:13 EST, Dies Koper CLA
no flags Details | Diff
complete set of changes for Symfoware (incl. INNER JOIN and better fastTableCreator fixes) (285.30 KB, patch)
2010-02-19 22:50 EST, Dies Koper CLA
douglas.clarke: iplog+
Details | Diff
patch to exclude two additional tests (5.36 KB, patch)
2010-02-26 01:55 EST, Dies Koper CLA
no flags Details | Diff
suggested patch for platform jvmargs (9.53 KB, patch)
2010-03-03 08:10 EST, Dies Koper CLA
no flags Details | Diff
include bug numbers in comments of excluded tests (21.04 KB, patch)
2010-03-09 04:52 EST, Dies Koper CLA
no flags Details | Diff
fix error in comment (1.17 KB, patch)
2010-05-02 20:29 EDT, Dies Koper CLA
no flags Details | Diff
Fix for the creation of DDL for Index (716 bytes, patch)
2010-06-10 02:52 EDT, zhao jianyong CLA
no flags Details | Diff
Better way for creation and deletion of Index (4.41 KB, patch)
2010-06-10 04:11 EDT, zhao jianyong CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dies Koper CLA 2009-09-06 22:45:47 EDT
We would like to use EclipseLink's JPA with Symfoware Server, which is
Fujitsu's RDBMS.

http://www.fujitsu.com/global/services/software/symfoware/

I'm preparing a patch, which is based on the Symfoware JPA platform implementation in Interstage Application Server V9.2.
I will attach it here after a bit more testing.

See also the SymfowarePlatform wiki:

http://wiki.eclipse.org/EclipseLink/Development/Incubator/Extensions/SymfowarePlatform
Comment 1 Dies Koper CLA 2009-09-15 09:48:45 EDT
Created attachment 147192 [details]
initial implementation
Comment 2 Dies Koper CLA 2009-09-15 10:19:26 EDT
Created attachment 147199 [details]
changes to EclipseLink common code for Symfoware platform

This patch fixes a few common issues, and addresses a number of issues with the use of Symfoware Platform:

Common issues addressed:
- ALTER TABLE ADD/DROP for unique constraints added to DDL file even if supportsUniqueKeyConstraints() returns false.
 -> added supportsUniqueKeyConstraints() check.
- ALTER TABLE ADD/DROP for primary key constraints added to DDL file even if supportsForeignKeyConstraints() returns false.
 -> added supportsForeignKeyConstraints() check.
- Table generators are not referenced by their correct name, leading to the default TableGenerator to be used.
 -> fixed table generator names.
- compile warning in EJBQueryImpl.java
 -> removed unused import
- compile error in EntityManagerFactory.java
 -> changed return type of getPersistenceUnitUtil()

Issues for Symfoware addressed:
- ALTER TABLE ADD/DROP CONSTRAINT not supported on Symfoware
 -> constraints added during CREATE TABLE
- Primary and unique keys without indices cannot be accessed on Symfoware
 -> indices on primary and unique keys are created/dropped when tables are created/dropped.
- reserved SQL keywords cannot be used in table/column names on Symfoware
 -> enclosed keywords SEQUENCE, ROLE, LANGUAGE, DOMAIN, VALUE with double quotes.
- Symfoware's CREATE INDEX syntax is different from Oracle's.
 -> changed hard-coded index creation statements in JUnit tests to use DatabasePlatform's index creation methods.
- Symfoware supports no more than 18 for precision of NUMERIC.
 -> reduced precision where higher to 18 for this type.
- Some JUnit tests test unsupported functions in Symfoware.
 -> added code to log a warning and abort/skip those tests on Symfoware.
Comment 3 Tom Ware CLA 2009-10-16 16:14:17 EDT
Integrated a subset of the changes.  The following have not been integrated:

1. isSymfowarePlatform() and references to it - these will have to wait until the actual SymfowarePlatform is distributed as part of the product
2. Changes in default name of SEQUENCE table for deployment and sessions.xml. -These have to high a backward compatibility risk since some DBs will not support quoted identifiers or will use an identifier other that double quote.  We will have to address any issues we come across related to this in testing within the test framework

Review - Tom Ware reviewed for contributer, Dies Koper

Testing:

Full Core and JPA test models have been run against the changes on Oracle
JPA test model has been run on SQL server
Other platforms will be picked up by our QA runs

Tests for added functionality are left to be tested as part of Symfoware platform testing

Leaving bug open until SymfowarePlatform is complete
Comment 4 Dies Koper CLA 2009-10-21 04:32:16 EDT
Created attachment 150075 [details]
fixes column precision/length issues in Foundation tests

Fixes issues found during Foundation JUnit test set run on Symfoware platform:
- decreases precision of NUMERIC columns to 18 (max on Symfoware).
- sets size of BLOB and CLOB columns (as Symfoware defaults are not big enough to hold these tests' data)
Comment 5 Dies Koper CLA 2009-10-23 22:28:21 EDT
Created attachment 150433 [details]
current state of your code that attempts to create a traditional JOIN query

Issue: Inner Join Keyword

EclipseLink generates a query such as the following for a Many-To-Many relationship with a join table representing the relationship:

 SELECT t1.ID, t1.NAME, t1.SALARY FROM EMPLOYEE t1 LEFT OUTER JOIN (EMPLOYEE_PROJECT t2 JOIN PROJECT t0 ON (t0.ID = t2.projects_ID)) ON (t2.employees_ID = t1.ID)

Symfoware does not support the (inner) join syntax used in this query. It uses the following syntax to join tables:

 SELECT t1.ID, t1.NAME, t1.SALARY FROM EMPLOYEE t1 LEFT OUTER JOIN (SELECT t2.employees_ID FROM EMPLOYEE_PROJECT t2, PROJECT t0 WHERE (t0.id = t2.projects_ID)) AS cor0 ON (cor0.employees_ID = t1.ID)

* "cor0" is a 'correlation name'; it cannot be omitted.

Comparing these two queries, there are only minimal differences.
Lines starting with '>' need to be added.
Lines starting with '->' replace the previous line.

  SELECT t1.ID, t1.NAME, t1.SALARY 
  FROM EMPLOYEE t1 LEFT OUTER JOIN (

>   SELECT t2.employees_ID
>   FROM

    EMPLOYEE_PROJECT t2 JOIN PROJECT t0
->  EMPLOYEE_PROJECT t2, PROJECT t0

    ON (t0.ID = t2.projects_ID)
->  WHERE (t0.ID = t2.projects_ID)

  ) ON (t2.employees_ID = t1.ID)
->) AS t3 ON (t3.employees_ID = t1.ID)

Main issues are:
- generating/obtaining a unique correlation name ('t3' here)
- substituting the correlation name into the final ON clause
- dealing with multiple join tables.
  In this case the extra tables would probably need to be added to the subquery's FROM clause, and PK/FK comparisons to its WHERE clause.
  This is slightly different from the inner join's case, as that just repeats/nests additional JOINs.
Comment 6 Dies Koper CLA 2009-10-23 22:37:00 EDT
Created attachment 150434 [details]
fixes issues where SEQUENCE is used as table or column name in Foundation/core tests
Comment 7 Dies Koper CLA 2009-10-23 22:44:40 EDT
Created attachment 150435 [details]
adds sizes to BLOB tests in Foundation/core (obsoletes part of 150075)
Comment 8 Tom Ware CLA 2009-10-30 14:23:16 EDT
checked in 2 patches:

- fixes issues where SEQUENCE is used as table or column name in Foundation/core tests 

- adds sizes to BLOB tests in Foundation/core (obsoletes part of 150075)
Comment 9 Dies Koper CLA 2009-12-14 02:33:49 EST
Created attachment 154389 [details]
address various issues in foundation and jpa code and tests for Symfoware

Addresses the following issues:

- Split up DatabaseCall#ignoreFirstRowMaxResultsSettings into firstRow and maxResults as Symfoware only supports LIMIT.
- Add class name to ReportQueryResult#toString() to help identify DB dependent return types in Scenario2_2c.
- Use platform's table sequence name in InitializeDescriptorsBeforeLoginTest, MetadataProject.
- Decrease NUMBER precision in MasterSlaveTableCreator to satisfy Symfoware's max of 18.
- Override Employee's toString() method in WrappedEmployee to prevent exception in AbstractSession#executeQuery when running ShouldRegisterResultsInUnitOfWorkTest and DescriptorShouldRegisterResultsInUnitOfWorkTest with FINEST level.
- Only drop constraints on platforms that support it in OwnershipSystem.
- Add exception info in assert message in NamedNativeQueryJUnitTest.
- Match sequence generator name to generator declared in descriptors advanced-extended-entity-mappings.xml and advanced-entity-mappings.xml.

Wasn't sure about sequence generator XML_EMPLOYEE_TABLE_GENERATOR in jpa\eclipselink.jpa.test\resource\eclipselinkorm\eclipselink-xml-extended-model\eclipselink-orm.xml.. Where is it defined?
Comment 10 Dies Koper CLA 2009-12-17 02:31:15 EST
Created attachment 154632 [details]
same as the previous patch, without the changes to DatabaseCall.java and DatabaseAccessor.java
Comment 11 Dies Koper CLA 2009-12-17 06:38:13 EST
Created attachment 154648 [details]
changes to source to try to find out where default table sequences get their table name "SEQUENCE" from
Comment 12 Tom Ware CLA 2009-12-17 15:12:20 EST
Checked in patch "same as the previous patch, without the changes to DatabaseCall.java and DatabaseAccessor.java "
Comment 13 Dies Koper CLA 2010-01-11 08:13:58 EST
Created attachment 155737 [details]
fixes issues for incorrect sequence generator names, column length/precision/type issues, avoiding UpdateAll/DeleteAll queries in set-up code, FAST table creation fixes

Fixes:
- FAST table creation flag not checked
- Sequence generator name incorrectly or not specified, leading to default SEQUENCE table being used which does not work on Symfoware
- Replaced UpdateAll/DeleteAll queries in test set-up/clean-up code
- Specified BLOB/CLOB column size
- Reduced NUMBER column precision to be in Symfoware's acceptable range
- Correct column type (RAM) to NUMBER to allow comparison with numbers in test
- Table name 'POSITION' is a reserved SQL keyword, renamed to 'POS'
- Improved test assert message to include details
- Duplicate column name 'Buyer_CREDITCARDS'
Comment 14 Dies Koper CLA 2010-01-22 10:06:55 EST
Created attachment 156941 [details]
patch to allow FirstRow and Max to be set independently
Comment 15 Dies Koper CLA 2010-01-26 09:36:36 EST
Created attachment 157256 [details]
complete set of changes for Symfoware; passed Core and JPA SRGs
Comment 16 Dies Koper CLA 2010-01-26 17:39:12 EST
Created attachment 157351 [details]
complete set of changes for Symfoware (prev. patch was corrupted)
Comment 17 Tom Ware CLA 2010-02-11 15:25:46 EST
Created attachment 158907 [details]
Updated patch to generalize some changes in the previous patch
Comment 18 Dies Koper CLA 2010-02-12 08:13:28 EST
Created attachment 158973 [details]
updated previous patch to illustrate fix for fastTableCreator, and added fix for INNEr JOIN issue for review
Comment 19 Dies Koper CLA 2010-02-19 22:50:17 EST
Created attachment 159658 [details]
complete set of changes for Symfoware (incl. INNER JOIN and better fastTableCreator fixes)
Comment 20 Tom Ware CLA 2010-02-23 10:35:07 EST
*** Bug 289163 has been marked as a duplicate of this bug. ***
Comment 21 Dies Koper CLA 2010-02-26 01:55:53 EST
Created attachment 160268 [details]
patch to exclude two additional tests
Comment 22 Dies Koper CLA 2010-03-03 08:10:04 EST
Created attachment 160771 [details]
suggested patch for platform jvmargs
Comment 23 Dies Koper CLA 2010-03-09 04:52:50 EST
Created attachment 161427 [details]
include bug numbers in comments of excluded tests
Comment 24 Dies Koper CLA 2010-03-15 17:18:51 EDT
I, Dies Koper, declare that I developed attached patches based on code
belonging to Fujitsu Ltd., without referencing any 3rd party materials
except material licensed under the EPL. I am authorized by Fujitsu Ltd.
to make this contribution under the EPL. The patch includes a few
modifications by EclipseLink committer Tom Ware.
Comment 25 Tom Ware CLA 2010-03-22 11:53:30 EDT
All changes have been checked in and tested.

IPLog has been updated.  (CQ 3848 was approved for actual platform changes)
Comment 26 Dies Koper CLA 2010-05-02 20:29:08 EDT
Created attachment 166744 [details]
fix error in comment

comment had a mix-up:

 left table maps to a subclass, right table to the main class in an
 inheritance mapping with a joined subclass
 strategy

should be:

 left table maps to the main class, right table to a subclass in an
 inheritance mapping with a joined subclass
 strategy
Comment 27 zhao jianyong CLA 2010-06-10 02:52:10 EDT
Created attachment 171606 [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.
Comment 28 zhao jianyong CLA 2010-06-10 04:11:04 EDT
Created attachment 171614 [details]
Better way for creation and deletion of Index
Comment 29 Tom Ware CLA 2010-06-10 08:33:10 EDT
Thank you for the patch.  Is it possible to open a new bug and attach the patch.  This bug is closed and likely will not get any futher attention.
Comment 30 zhao jianyong CLA 2010-06-10 22:17:13 EDT
(In reply to comment #29)
> Thank you for the patch.  Is it possible to open a new bug and attach the
> patch.  This bug is closed and likely will not get any futher attention.
See Bug 316563.
Comment 31 Eclipse Webmaster CLA 2022-06-09 10:22:24 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink