Community
Participate
Working Groups
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
Created attachment 147192 [details] initial implementation
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.
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
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)
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.
Created attachment 150434 [details] fixes issues where SEQUENCE is used as table or column name in Foundation/core tests
Created attachment 150435 [details] adds sizes to BLOB tests in Foundation/core (obsoletes part of 150075)
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)
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?
Created attachment 154632 [details] same as the previous patch, without the changes to DatabaseCall.java and DatabaseAccessor.java
Created attachment 154648 [details] changes to source to try to find out where default table sequences get their table name "SEQUENCE" from
Checked in patch "same as the previous patch, without the changes to DatabaseCall.java and DatabaseAccessor.java "
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'
Created attachment 156941 [details] patch to allow FirstRow and Max to be set independently
Created attachment 157256 [details] complete set of changes for Symfoware; passed Core and JPA SRGs
Created attachment 157351 [details] complete set of changes for Symfoware (prev. patch was corrupted)
Created attachment 158907 [details] Updated patch to generalize some changes in the previous patch
Created attachment 158973 [details] updated previous patch to illustrate fix for fastTableCreator, and added fix for INNEr JOIN issue for review
Created attachment 159658 [details] complete set of changes for Symfoware (incl. INNER JOIN and better fastTableCreator fixes)
*** Bug 289163 has been marked as a duplicate of this bug. ***
Created attachment 160268 [details] patch to exclude two additional tests
Created attachment 160771 [details] suggested patch for platform jvmargs
Created attachment 161427 [details] include bug numbers in comments of excluded tests
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.
All changes have been checked in and tested. IPLog has been updated. (CQ 3848 was approved for actual platform changes)
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
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.
Created attachment 171614 [details] Better way for creation and deletion of Index
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.
(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.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink