CMDBuild Forum

Bug 2.3.3: cannot delete domain

Hi,

I think I have identified a bug in 2.3.3: I cannot delete a domain after I have used it once even if I have delete all existing usages.

  • create domain (1:N for existing class to same class)
  • switch to management module
  • add mapping
  • find mistake in design (need to have N:N)
  • delete existing relation
  • switch to admin mode
  • try to delete domain --> error: CM_CONTAINS_DATA

Problem seems to be table "MAP_<Domainname>" contains values in status "N" (there for not visible in UI) without enddate. Due to trigger setup values cannot be deleted - also not manually.

System:

  • cmdbuild 2.3.3 on Tomcat 7
  • postgres 9.4.4

How can I delete the data from the table so I can delete the domain?

 

Regards
Joern

 

If you delete the existing relationships, they are stored in the historical table (“Map_” + domain name + _history”).
You can delete the domain only if you have not entered any relationship.
Otherwise you have to set the domain as “Not activeand then create another.

Or, if you are an advanced user and you're sure to operate in accordance with the of CMDBuild logic, you can "clean" the historical domain table operating directly in the database via SQL ("truncate table").
CMDBuild Team

 

 

Thanks for pointing this out. Indeed I could delete the domain after truncating the postgres table.  Please check if there is a possibility to add this feature into the UI - if you are an unexperienced user you do mistakes during design phase. And since you cannot rename the existing domain setting it to inactive confuses at least your namespace

The suggested feature would prevent to always have available all the history of changes to a card, and this would be against the CMDBuild philosophy.
CMDBuild Team

Hi,
the feature would be actually very useful. After I created some sample data for training I see I cannot delete it and I will have to clean the Database or reinstall the application. This is really painful. I think that SuperUser should have the possibility of deleting data. All other users - probably not. 
 
Please don't act in a 'It's not a bug, it's a feature!' kind of way :)
 
Cheers,
Greg
 
 
Previously Tecnoteca wrote:
The suggested feature would prevent to always have available all the history of changes to a card, and this would be against the CMDBuild philosophy.
CMDBuild Team

 

I'm sorry, as I have already explained to you and how it is explained in all CMDBuild manuals, to use your words this is a feature and not is a bug ...

CMDBuild Team