#800 closed defect (fixed)
SetBaseClass should consider different class type
Reported by: | Christinebao | Owned by: | christinebao |
---|---|---|---|
Priority: | major | Milestone: | 3.6.0 |
Component: | FDO API | Version: | 3.6.0 |
Severity: | 3 | Keywords: | |
Cc: | External ID: | 1427180 |
Description
Currently in ClassDefinition.cpp function SetBaseClass is in this way:
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() ) ); ...
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.
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.
Attachments (2)
Change History (7)
by , 13 years ago
Attachment: | Fix800.patch added |
---|
comment:1 by , 13 years ago
comment:3 by , 13 years ago
One more related defect is reported by Autodesk QA:
In another case, base class is FdoClassType_Class, and child class is FdoClassType_FeatureClass, it should still pass the assign.
by , 13 years ago
Attachment: | Fix800_2.patch added |
---|
comment:4 by , 13 years ago
Attach patch http://trac.osgeo.org/fdo/attachment/ticket/800/Fix800_2.patch to fix the above problem.
Attach a patch http://trac.osgeo.org/fdo/attachment/ticket/800/Fix800.patch for fixing this ticket.