Release : 4.9.1
Component : CA Test Data Manager - TDM Web Portal
From the UI, we only support one of the composite keys. In this case, the query that is built in the backend will use the chosen relationship rather than the composite key when joining the two tables.
However you will be able to create a Find and Reserve model that uses the composite key by using swagger directly.
You should provide the whole composite key when creating the association
In my case I used department as root entity and ....
CREATE TABLE dbo.department
(
id int NOT NULL,
name nvarchar(50) NOT NULL,
location nvarchar(50),
CONSTRAINT PK_dbo_department_id_name
PRIMARY KEY CLUSTERED (id,name)
);
CREATE TABLE dbo.person
(
id int NOT NULL,
name nvarchar(50) NOT NULL,
age int,
dept_id int,
dept_name nvarchar(50),
CONSTRAINT PK_dbo_t2_id_name
PRIMARY KEY CLUSTERED (id,name),
CONSTRAINT FK_dbo_t2_t1_id_name
FOREIGN KEY (dept_id, dept_name)
REFERENCES dbo.department (id, name)
);
The request call
http://localhost:8080/TDMDataReservationService/api/ca/v1/testDataModels/1132/associations?projectId=2358&versionId=2359&forceUpdate=false
had the following payload
{
"name":"person",
"associationType":"ONE_ONE",
"joinFields":[
{
"referenceFieldName":"dept_id",
"fieldName":"id"
},
{
"referenceFieldName":"dept_name",
"fieldName":"name"
}
],
"sourceEntity":{
"name":"department",
"dataSource":"ds2",
"schema":"dbo"
},
"targetEntity":{
"name":"p
erson",
"dataSource":"ds2",
"schema":"dbo"
},
"dataModelId":1132,
"projectId":2358,
"versionId":2359
}
Is there a way to create more than one field at the time or one call = one field ? One call - One field.