Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
The commonj.sdo data types are not available by default through the TypeHelper.
They can be loaded in using XSDHelper.define() with the sdoModel.xsd file. However, the default instance class for commonj.sdo.Integer is java.math.BigInteger. Calling DataObject.set(property, value) where property is of type commonj.sdo.Integer and value is a java.lang.Integer will fail with a ClassCastException.
Modifying the instance class in the sdoModel.xsd will not solve this, as the instanceClass attribute is being ignored and the runtime will default to BigInteger. XSDEcoreHelper is looking for the instanceClass attribute in the Ecore namespace but it is defined in the commonj.sdo/java namespace.