Community
Participate
Working Groups
This is purely testing bug. Currently ReturningPolicyTestModel contains 4 sub models that use SubstituteSequencingWithReturningPolicyAdapter. Currently each one of them fails to run producing: VERSION: Eclipse Persistence Services - 2.2.0.qualifier TEST MODEL NAME: ComplexUpdateAndUnitOfWorkTestModel using SubstituteSequencingWithReturningPolicyAdapter MODEL DESCRIPTION: RESULTS OF TEST MODEL: ComplexUpdateAndUnitOfWorkTestModel using SubstituteSequencingWithReturningPolicyAdapter SETUP WARNING: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.testing.framework.TestWarningException Exception Description: Currently supports Oracle platform only That occurs even on Oracle! That is caused by SubstituteSequencingWithReturningPolicyAdapter.createSequences method, where: if (!session.getPlatform().isOracle()) { throw new TestWarningException("Currently supports Oracle platform only"); } was mistakenly substituted for: if (session.getPlatform().supportsSequenceObjects()) { throw new TestWarningException("Currently supports Oracle platform only"); } After fixing this error (that occured more than a year ago) running ReturningPolicyTestModel (now including the 4 previously missing sub models) produced several test failures. The failures where caused by added (or altered) tests that never ran under ReturningPolicyTestModel. All errors appear to be caused by the tests - not by the core.
Created attachment 185661 [details] suggested patch The patch reverses the boolean check that caused the 4 sub models to be excluded. Adding additional attribute to Cousin and Relative classes fixed failures of AggregateRelationshipsOneToOneTestCase and AggregateRelationshipsManyToManyTestCase. The failures occured because when sequecing is substituted for returning lack of any other (than PK) fields caused creation of an illegal insert statment without fields to be inserted, though with a field to be returned. RegisterNewObjectInIdentityMapNoSeqTest has to be augmented because - when it uses sequencing - it relies upon that being "before-insert" sequencing (like table sequencing), however ReturningPolicy functions like "after-insert" sequencing (like identity) and therefore these tests should not be run under ReturningPolicyTestModel (which is easily identified by descriptor's sequence being null).
fixed in trunk (2.3)
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink