| Summary: | Support cross-referencing (XRef) for abstract classes and class hierarchies | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Lothar Werzinger <lothar> | ||||||||
| Component: | cdo.db | Assignee: | Stefan Winkler <stefan> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | jon, saulius.tvarijonas, stepper | ||||||||
| Version: | 4.0 | Keywords: | noteworthy | ||||||||
| Target Milestone: | --- | Flags: | stepper:
review+
|
||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | Power to the People | ||||||||||
| Bug Depends on: | 332912 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Lothar Werzinger
Here's the relevant part of the cdo-server.xml that we are using:
<repository name="marketplace1">
<property name="supportingAudits" value="true"/>
<property name="supportingRevisionDeltas" value="true"/>
<property name="supportingBranches" value="true"/>
<property name="verifyingRevisions" value="false"/>
<property name="currentLRUCapacity" value="10000"/>
<property name="revisedLRUCapacity" value="100"/>
<store type="db">
<!-- type: horizontal | horizontalAuditWithRanges | horizontalBranchingWithRanges | vertical | <any user-contributed type>-->
<mappingStrategy type="horizontalBranchingWithRanges">
<!-- ONE_TABLE_PER_REFERENCE | ONE_TABLE_PER_CLASS | ONE_TABLE_PER_PACKAGE | ONE_TABLE_PER_REPOSITORY | LIKE_ATTRIBUTES -->
<property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
<!-- LIKE_ATTRIBUTES | LIKE_TO_MANY_REFERENCES-->
<property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
<!-- MODEL | STRATEGY-->
<property name="mappingPrecedence" value="MODEL"/>
</mappingStrategy>
<dbAdapter name="mysql"/>
<dataSource class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
url="jdbc:mysql://localhost/ts_marketplace1"
user="cdo"
password="cdo"/>
</store>
</repository>
Created attachment 185482 [details]
Patch-v1-wo-cache
Fixes the basic issue for the bug.
Yet, a caching mechanism to speed up the performance of the search for all subclasses is missing.
Eike, before I implement the cache, can you have a look at the basic implementation and double-check, if this is what we want (as discussed last week)?
I have also included a test-case to reproduce the basic issue and the case for which the subclasses are needed in the first place.
I believe in your code in CDOModelUtil has two bugs: 1) packageRegistry.values() is always dangerous. Better keySet() + getEPackage() 2) We should use getE *All* SuperTypes() I'll attach a new patch... As a preparation for the caching of descendent classes I'd prefer to pass a CDOPackageRegistry into the static collectXYZ() methods. Using the StoreThreadLocal is to be limited as much as possible. Note that you can make use of IQueryContext.getView().getSession().getManager().getRepository() Created attachment 185491 [details]
Patch v2
Created attachment 185535 [details] Patch-v3 As discussed on Skype, cache implementation is in Bug 332912. Therefore, this patch needs the patch of Bug 332912 in the workspace as well to compile. Committed to HEAD Available in R20110608-1407 |