[fdo-trac] #800: SetBaseClass should consider different class type
FDO
trac_fdo at osgeo.org
Wed Nov 30 22:52:25 EST 2011
#800: SetBaseClass should consider different class type
----------------------------+-----------------------------------------------
Reporter: Christinebao | Owner: christinebao
Type: defect | Status: new
Priority: major | Milestone: 3.6.0
Component: FDO API | Version: 3.6.0
Severity: 3 | Keywords:
External_id: 1427180 |
----------------------------+-----------------------------------------------
Currently in ClassDefinition.cpp function SetBaseClass is in this
way:[[BR]]
{{{
void FdoClassDefinition::SetBaseClass(FdoClassDefinition* value)
{
...
if (value)
{
// Base class must have same class type.
if ( GetClassType() != value->GetClassType() )
throw FdoSchemaException::Create(
FdoException::NLSGetMessage(FDO_NLSID(SCHEMA_141_BASETYPECONFLICT),
(FdoString*) GetQualifiedName(),
(FdoString*) value->GetQualifiedName()
)
);
...
}}}
[[BR]]
It constraint that base class must be the same type of child class. It's
true if the base class is already set to child class, but before setting
base class, child type can be FdoClassType_Class and base class can be
FdoClassType_FeatureClass. In this case the setBaseClass will never
success.[[BR]]
The fix is not to check class type if child class is FdoClassType_Class.
If child class is FdoClassType_Class, it could change to another type
after setting base class, and get the same class type with base class.
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/800>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list