Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336414

Summary: [DB] Make the used CDOIDObject subtype and storage pluggable
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.dbAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: stefan
Version: 4.0Keywords: noteworthy
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1
none
Patch v2
none
Patch v3 - comile error free
none
Patch v4 - most tests pass
none
Patch v5
none
Patch v6
none
Patch v7
none
Patch v8
none
Patch v9 - for future reference
none
Patch v10 - full patch with StringIDHandler
none
supplemental-patch-v1 none

Description Eike Stepper CLA 2011-02-05 04:45:35 EST
The DBStore hardcodes long-valued CDOIDs everywhere. Make this configurable. This would also be needed for UUIDs.
Comment 1 Eike Stepper CLA 2011-02-05 04:48:42 EST
Created attachment 188385 [details]
Patch v1

I renamed the typical helper methods that create, parse or deal otherwise with long value IDs. Then I fixed most of the resulting compile errors by delegating to the new IIDHandler which is maintained by IDBStore. Now I'm down to 18 errors.

I roughly identified some additional challenges:

ITypeMapping
ITypeMapping.Factory
initTable() methods

IMetaDataManager

ObjectTypeTable.idField

IExternalReferenceManager
CDODBSchema.EXTERNAL_ID!!!

FeatureMap tags???

repairAfterCrash()
Comment 2 Eike Stepper CLA 2011-02-06 04:53:56 EST
Created attachment 188402 [details]
Patch v2
Comment 3 Eike Stepper CLA 2011-02-06 06:04:44 EST
Created attachment 188403 [details]
Patch v3 - comile error free

All issues addressed, untested.
Comment 4 Eike Stepper CLA 2011-02-06 07:44:37 EST
Created attachment 188405 [details]
Patch v4 - most tests pass
Comment 5 Eike Stepper CLA 2011-02-06 13:25:56 EST
Created attachment 188409 [details]
Patch v5
Comment 6 Eike Stepper CLA 2011-02-06 13:33:01 EST
Created attachment 188410 [details]
Patch v6
Comment 7 Eike Stepper CLA 2011-02-06 15:48:57 EST
Created attachment 188412 [details]
Patch v7
Comment 8 Eike Stepper CLA 2011-02-06 16:45:46 EST
Created attachment 188414 [details]
Patch v8
Comment 9 Eike Stepper CLA 2011-02-07 02:18:40 EST
Created attachment 188420 [details]
Patch v9 - for future reference
Comment 10 Eike Stepper CLA 2011-02-07 06:44:09 EST
Created attachment 188428 [details]
Patch v10 - full patch with StringIDHandler

feature maps fail with StringIDHandler
Comment 11 Eike Stepper CLA 2011-02-07 06:48:53 EST
Committed revision 7028 (patch v10):

- trunk/org.eclipse.emf.cdo.server
- trunk/org.eclipse.emf.cdo.server.db
- trunk/org.eclipse.emf.cdo.server.hibernate
- trunk/org.eclipse.emf.cdo.server.objectivity
Comment 12 Stefan Winkler CLA 2011-02-07 11:01:17 EST
Created attachment 188446 [details]
supplemental-patch-v1

Patch-v10 misses a handler-dependent DBField (which actually should have been BIGINT, not INTEGER, BTW). This patch fixes the field.
All non-Workspace tests pass now.
Comment 13 Eike Stepper CLA 2011-02-08 08:13:17 EST
Committed revision 7029:
- trunk/plugins/org.eclipse.emf.cdo.server.db
- trunk/plugins/org.eclipse.emf.cdo.tests
Comment 14 Eike Stepper CLA 2011-02-08 08:13:37 EST
Good catch, Stefan!
Comment 15 Eike Stepper CLA 2011-06-23 03:41:07 EDT
Available in R20110608-1407