Hi guys,
I really want see all the cmdbuild features working in my setup. Now I`m trying to import data using the Import CSV from Utility menu. When importing a data to a single class (Office for instance) I see no problem (followed http://www.cmdbuild.org/file/manuali/user-manual-in-english - page 56). The difficulty is when trying to import data to a class that has "relation" to another. Let us say I have two classes: People and Login when People is just a few attributes regarding someone (name, document, email, etc) and Login has also few attributes (username, type, id). I did create a Domain called PeopleLogin where:
class1 = People
class2 = Login
Direct description = Has
Inverse description = Belongs to
Carnality = 1:N (each People can have multiple Logins).
Well, now I want to create a csv file that have all the info (including the Login info) and import it to cmdbuild. How should my csv file look like? anywhere I can find an example?
Any help will be appreciated.
thx,
sergio
The CSV import function can also create relations 1: N, if there is a reference attribute on that domain
.
In this case, the reference attribute must be specified in the CSV file by using the value of the linked "Code" attribute.
This is described in the User Manual (page 57).
CMDBuild Team
Previously Tecnoteca wrote:
The CSV import function can also create relations 1: N, if there is a reference attribute on that domain
.
In this case, the reference attribute must be specified in the CSV file by using the value of the linked "Code" attribute.
This is described in the User Manual (page 57).
CMDBuild Team
Hi there,
worked! my confusion was because I didn't get the point that was necessary to "create" an attribute (Reference type). Well now I'm almost there. I still have some problems with the import. I have 3 Domains (in my setup example), 2 has N:1 cardinality (PersonBranch and PersonCompany) and 1 has 1:N cardinality (PersonLogin). The PersonLogin Domain is not visible when creating an attribute to the Person class. I believe there is something to do with the cardinality (1:N) but I have now idea how to solve it.
thanks in advance ..
sergio
You can only create a reference attribute on a classe side N of a 1:N or N:1 domain
CMDBuild Team
The solution that we use in these cases is to write an insert SQL query and run it from pgAdmin.
But this can be a critical operation (the database may become inconsistent) and is recommended for advanced users.
CMDBuild Team