Hi folks,
You are creating a great tool! I’m testing cmdbuild 1.0 for my company in Uruguay (SA), and I have this issue I couldn’t manage to resolve: I want to change the cardinality of a created domain.
I have no option to edit it, so I tried to delete the domain. I selected it, clicked in the red button, the page sended the information, but… the domain is still there.
In the cmdbuild.log I found this line:
INFO 2009-08-06 16:44:34 [jsonrpc ] Calling url /schema/modclass/deletedomain
What can I do?
Thanks very much for your kind help.
Edmundo Moris
Dear Edmundo,
thanks for trying CMDBuild. Currently it is not possibile to change the cardinality of a domain, but you should be able to delete it if there is no relation on that domain (rows in the database table Map_{DomainName}) and no reference attribute using it. Also it is not possible to removea reference attribute from a table. We are working to let the shema designer delete attributes that have no data (both in current and historical data), thus allowing the removal of the associated domain. In the meantime I suggest you to disable the attribute and the domain ("active" flag for both).
It seems that you are not receiving any error. Are you? If that is the case, you may have found a bug.
You can increase the log verbosity in the file {CMDBUILD_WEBAPP}/WEB-INF/conf/log4j.conf. To debug your issue, I suggest you turn log4j.logger.persist, log4j.logger.sql and log4j.logger.jsonrpc to DEBUG.
Paolo
Thank you Paolo,
You are right: the map table holds a record of a relation between two classes. The classes were normally deleted, but the relation is still with status ‘A’. I tried to delete it from postgre but I think there’s some kind of trigger or condition that avoids me doing that:
ERROR: record “new” is not assigned yet
SQL state: 55000
Detail: The tuple structure of a not-yet-assigned record is indeterminate.
Context: PL/pgSQL function “after_archive_relation_row_map_usa08” line 34 at SQL statement
When I tried to delete the domain from the web application, I didn’t received any error message and the error log shows this:
INFO 2009-08-07 10:20:01 [jsonrpc ] Calling url /schema/modclass/deletedomain
DEBUG 2009-08-07 10:20:01 [jsonrpc ] parameter “idClass”: 21557
DEBUG 2009-08-07 10:20:01 [jsonrpc ] parameter “md”: false
DEBUG 2009-08-07 10:20:01 [jsonrpc ] parameter “origName”: usa08
DEBUG 2009-08-07 10:20:01 [jsonrpc ] parameter “idDomain”: 23183
DEBUG 2009-08-07 10:20:01 [sql ] select * from system_domain_delete(usa08) as result
INFO 2009-08-07 10:20:02 [jsonrpc ] Calling url /schema/modclass/getdomainlist
DEBUG 2009-08-07 10:20:02 [jsonrpc ] parameter “idClass”: 21557
DEBUG 2009-08-07 10:20:02 [sql ] SELECT * FROM system_domaincatalog WHERE (domainclass1 = ANY (string_to_array(CI,SoporteDeAlpicaciones,ServidorLogico, ‘,’))) OR (domainclass2 = ANY (string_to_array(CI,SoporteDeAlpicaciones,ServidorLogico, ‘,’)))
INFO 2009-08-07 10:20:02 [persist ] Building domain cache
Then I tried to deactivate the relation as you suggested, with the same result: the domain is still active.
INFO 2009-08-07 10:23:12 [jsonrpc ] Calling url /schema/modclass/savedomain
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “isactive”: false
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “idClass”: 21557
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “md”: false
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “description”: usa
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “descrdir”: usa
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “descrinv”: es usado por
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “origName”: usa08
DEBUG 2009-08-07 10:23:12 [jsonrpc ] parameter “idDomain”: 23183
DEBUG 2009-08-07 10:23:12 [sql ] select * from system_domain_modify(23183,usa08,ServicioDeAplicacion,ServidorLogico,MODE: reserved|TYPE: domain|DESCRDIR: usa|DESCRINV: es usado por|CARDIN: N:1|MASTERDETAIL: false|OPENEDROWS: 0|STATUS: NOTACTIVE|CLASS1: ServicioDeAplicacion|CLASS2: ServidorLogico|LABEL: usa) as result
INFO 2009-08-07 10:23:13 [jsonrpc ] Calling url /schema/modclass/getdomainlist
DEBUG 2009-08-07 10:23:13 [jsonrpc ] parameter “idClass”: 21557
If I change any of the description fields, the changes are preserved.
Do you have any further suggestion?
Thanks very much
Edmundo
Hi Edmundo,
we thank you for finding this bug. We confirm that currently it is not possible to disable a domain. We are working to fix it.
Martino