CMDBuild Forum

Import a class and a sub class

Hello

I just want to import a class and a subclass via CSV. Importing the subclass (lets call it B for the example) just works fine, but when I try to import the Class (let's call it A) I always have an Error Message (null value in column IdClass). I have the feeling that the error comes from the code attribute of the class A, so I tried to fill it with different values related to the B subclass, but I keep having this error message.

 

Does it exists a step by step tutorial on importing CSV files (or someone patient) , cause the usual manual (pages 56 and followings) didn't helped me to understand the way to do it properly.

 

I'm really stuck on this.

 

Thank you in advance for your help.

 

Regards 

 

Seb

You can't import a superclass.

In CMDBuild the superclasses can't have data, the normal classes include also attributes and data of the superclasses from which they inherit

CMDBuild Team

I don' t understand, but in addition to attributes that are inherited by the sub-class, the superclass hava also its own attributes. How  do you import data for those attributes?
 
Seb
 
 
Previously Tecnoteca wrote:

You can't import a superclass.

In CMDBuild the superclasses can't have data, the normal classes include also attributes and data of the superclasses from which they inherit

CMDBuild Team

 

My bad, I understood my mistake, everything's working fine now. Thanks for your help
 
Seb
 
Previously Seb wrote:
I don' t understand, but in addition to attributes that are inherited by the sub-class, the superclass hava also its own attributes. How  do you import data for those attributes?
 
Seb
 
 
Previously Tecnoteca wrote:

You can't import a superclass.

In CMDBuild the superclasses can't have data, the normal classes include also attributes and data of the superclasses from which they inherit

CMDBuild Team

 

 

My bad I understood my mistake. Everything is working fine now. Thanks a lot for your help.
 
I have a last question. I created a fake class to make some tests, and I want to delete this fake class now, but even if I deleted all the data inside when I try to delete the class I got an error message saying "cannot drop classes containing records" and the detail say that: ORM_CONTAINS_DATA.
 
What should I do to get rid of this class?
 
Seb
 
 
 
Previously Seb wrote:
I don' t understand, but in addition to attributes that are inherited by the sub-class, the superclass hava also its own attributes. How  do you import data for those attributes?
 
Seb
 
 
Previously Tecnoteca wrote:

You can't import a superclass.

In CMDBuild the superclasses can't have data, the normal classes include also attributes and data of the superclasses from which they inherit

CMDBuild Team

 

 

CMDBuild manages the complete versioning of any change to any card stored in the database (TAB History);
So even deletions are so logical and not physical, and this prevents the physical removal of the class.
A workaround for the problem, if in a class there are no active cards and if the historical data can be eliminated, is to run an SQL command to delete the history table:
     truncate table "[classe]_history";
CMDBuild Team