Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 119679 Details for
Bug 256928
AggregateTestModel using SubstituteSequencingWithReturningPolicyAdapter failed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
The patch.
256928_081205.patch (text/plain), 5.35 KB, created by
Andrei Ilitchev
on 2008-12-05 17:16:17 EST
(
hide
)
Description:
The patch.
Filename:
MIME Type:
Creator:
Andrei Ilitchev
Created:
2008-12-05 17:16:17 EST
Size:
5.35 KB
patch
obsolete
>Index: foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/ReturningPolicyTestModel.java >=================================================================== >--- foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/ReturningPolicyTestModel.java (revision 2889) >+++ foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/ReturningPolicyTestModel.java (working copy) >@@ -51,7 +51,15 @@ > if (getSession().getPlatform().isOracle()) { > addTest(new TestModelAdapted(new ComplexUpdateAndUnitOfWorkTestModel(), new SubstituteSequencingWithReturningPolicyAdapter(false))); > addTest(new TestModelAdapted(new EmployeeBasicTestModel(), new SubstituteSequencingWithReturningPolicyAdapter())); >- addTest(new TestModelAdapted(new AggregateTestModel(), new SubstituteSequencingWithReturningPolicyAdapter())); >+ >+ // Need to add the tables that were mapped by AggregateCollectionMappings >+ // overriding the original settings in AggregateCollectionMapping descriptors >+ SubstituteSequencingWithReturningPolicyAdapter substitute = new SubstituteSequencingWithReturningPolicyAdapter(); >+ // Builder.customers >+ substitute.getTableToField().put("BUILDER_CUSTOMER", "CUSTOMER_ID"); >+ substitute.getTableToSequence().put("BUILDER_CUSTOMER", "CUSTOMER_SEQ"); >+ addTest(new TestModelAdapted(new AggregateTestModel(), substitute)); >+ > addTest(new TestModelAdapted(new InheritanceTestModel(), new SubstituteSequencingWithReturningPolicyAdapter())); > } > if (getSession().getPlatform().isOracle()) { >Index: foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/SubstituteSequencingWithReturningPolicyAdapter.java >=================================================================== >--- foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/SubstituteSequencingWithReturningPolicyAdapter.java (revision 2889) >+++ foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/SubstituteSequencingWithReturningPolicyAdapter.java (working copy) >@@ -156,6 +156,14 @@ > } > } > >+ public Map getTableToField() { >+ return this.tableToField; >+ } >+ >+ public Map getTableToSequence() { >+ return this.tableToSequence; >+ } >+ > protected String getSequenceNameFromTableName(String tableName) { > String sequenceName; > if (tableToSequence != null) { >Index: foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/ReturningPolicy.java >=================================================================== >--- foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/ReturningPolicy.java (revision 2889) >+++ foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/ReturningPolicy.java (working copy) >@@ -64,7 +64,7 @@ > // returned on Update as read-write. > // main[i][RETURN_ONLY] + main[i][WRITE_RETURN] = main[i][MAPPED] > // main[i][MAPPED] + main[i][UNMAPPED] = main[i][ALL] >- protected Collection[][] main = new Collection[NUM_OPERATIONS][MAIN_SIZE]; >+ protected Collection[][] main; > > // maps ClassDescriptor's tables into Vectors of fields to be used for call generation. > // Lazily initialized array [NUM_OPERATIONS] >@@ -221,6 +221,8 @@ > > /** > * INTERNAL: >+ * Normally cloned when not yet initialized. >+ * If initialized ReturningPolicy cloned then the clone should be re-initialized. > */ > public Object clone() { > try { >@@ -576,8 +578,13 @@ > Hashtable infoHashtable = new Hashtable(); > for (int i = 0; i < infos.size(); i++) { > Info info1 = (Info)infos.elementAt(i); >- if (!info1.getField().hasTableName()) { >- info1 = (Info)info1.clone(); >+ info1 = (Info)info1.clone(); >+ DatabaseField descField = getDescriptor().buildField(info1.getField()); >+ if(info1.getField().getType() == null) { >+ info1.setField(descField); >+ } else { >+ // keep the original type if specified >+ info1.getField().setName(descField.getName()); > info1.getField().setTableName(getDescriptor().getDefaultTable().getQualifiedName()); > } > Info info2 = (Info)infoHashtable.get(info1.getField()); >@@ -603,6 +610,7 @@ > */ > public void initialize(AbstractSession session) { > clearInitialization(); >+ main = new Collection[NUM_OPERATIONS][MAIN_SIZE]; > > // The order of descriptor initialization guarantees initialization of Parent before children. > // main array is copied from Parent's ReturningPolicy >@@ -747,11 +755,7 @@ > > // only infos is filled out > protected void clearInitialization() { >- for (int operation = INSERT; operation <= UPDATE; operation++) { >- for (int state = RETURN_ONLY; state < MAIN_SIZE; state++) { >- main[operation][state] = null; >- } >- } >+ main = null; > tableToVectorOfFieldsForGenerationMap = null; > fieldsNotFromDescriptor_DefaultTable = null; > fieldsNotFromDescriptor_OtherTables = null;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 256928
: 119679