| Summary: | Rework CDO type system | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Eike Stepper <stepper> |
| Component: | cdo.core | Assignee: | Project Inbox <emf.cdo-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | chewbizz, saulius.tvarijonas, smcduff |
| Version: | 4.1 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 265435 | ||
| Bug Blocks: | 254698, 269789 | ||
|
Description
Eike Stepper
With your latest changed in CDOModelUtil ... (moving EEnum out of getCOreType) introduce a mistake. (even if all testcases passed).
When convertToCDO is called the following code is called:
else if (feature.getEType() instanceof EDataType)
{
EDataType eType = (EDataType)feature.getEType();
CDOType type = CDOModelUtil.getCoreType(eType);
if (type == null)
{
value = EcoreUtil.convertToString(eType, value);
}
}
EEnum is a EDataType...but it is not associated with a coretype. Should we call CDOModelUtil.getType instead of getCoreType ?
Since CDOTypeImpl of EENUm is dealing with String(before it was Integer and it should be integer) we are only lucky that it is working. (One side we used... EcoreUtil.convertToString the other side we take CDOType.
Maybe you wanted to refactor this part of this bug # 268663.
I've started to develop this feature ... but at the end EEnum is still a problem. Here my problem: With this refactoring I wanted to remove the conversion from the CDOStore.convertToEMF CDOStore.convertToCDO. The problem with EEnum is that if I do not transfer it, I can write it (transfer in a integer) but cannot read it since only with the number... I cannot do much. ? Should we leave it as a number ? ... in this case I will still need the convertToEMF for EENum. Simon CDOType now have a convertToEMF and convertToCDO. THe only one using it so far is EENum. The CDORevision will contains only the integer of the value EEnum. It will NOT contains the Enum value. If the back-end needs that value... it will need to convert himself or to use EObject. (Now that it is possible). At the moment, DBStore used EENumLiteral... it shouldn't. Should I update the code as well ? Does it make sense ? Also, since project dependency is yet not completed, conversion from EObject to CDOID will still happen in CDOStore. Common package doesn't know anything about InternalCDOView. :-( Another question i have : Let's say the user defined it's own CDOValueHandler. How the back-end will store it ? I mean..must it to be a String... or a model or something else ? Rebasing all unresolved enhancement requests to 3.0 Rebasing all outstanding enhancements requests to version 4.0 Moving all open enhancement requests to 4.1 No interest for years. WONTFIX. Closing. |