Adriano, This indeed seems to be a bug. Go ahead and write a JIRA please.
Thanks Best regards, Brady -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adriano Crestani Sent: Monday, October 08, 2007 3:43 PM To: [email protected] Subject: [SDO C++] DO having no container after removed from a reference list Hi, The code above is from DataObjectListImpl.cpp. As far as I know, when a DO is removed from a non-containment Property, it should not loose its container. Although, when it's removed from a list it's not checking if the property is containment or not, it always set the removed DO container as NULL. DataObjectPtr DataObjectListImpl::remove(unsigned int index) { validateIndex(index); if (container != 0) { container->logChange(pindex); } DataObjectPtr d = (*this)[index]; // log deletion only if the list is of data objects. if (theFactory != 0) { const Type& t = theFactory->getType(typeURI,typeName); const Property& p = container->getPropertyFromIndex(pindex); if (!t.isDataType() && !p.isReference()) { (getVec()[index])->logDeletion(); } } plist.erase(plist.begin()+index); DataObject* dob = getRawPointer(d); ((DataObjectImpl*)dob)->setContainer(0); // <<<<<<< should check if is a contaiment property before execute this operation return d; } If everything is ok, I will create a jira for that. Adriano Crestani --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
