Anybody experience in adding multiple AttributeExternalKey references to the same class?
iTop doesn't seem to accept e.g.
MetaModel::Init_AddAttribute(new AttributeExternalKey("first_location_id", array("targetclass"=>"FirstLocation", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Location AS L WHERE L.org_id = :this->org_id'), "sql"=>"location_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array('org_id')))); MetaModel::Init_AddAttribute(new AttributeExternalField("first_location_name", array("allowed_values"=>null, "extkey_attcode"=>"location_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("second_location_id", array("targetclass"=>"SecondLocation", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Location AS L WHERE L.org_id = :this->org_id'), "sql"=>"location_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array('org_id')))); MetaModel::Init_AddAttribute(new AttributeExternalField("second_location_name", array("allowed_values"=>null, "extkey_attcode"=>"location_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array())));
Log in to post a comment.
Anybody experience in adding multiple AttributeExternalKey references to the same class?
iTop doesn't seem to accept e.g.
MetaModel::Init_AddAttribute(new AttributeExternalKey("first_location_id", array("targetclass"=>"FirstLocation", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Location AS L WHERE L.org_id = :this->org_id'), "sql"=>"location_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array('org_id'))));
MetaModel::Init_AddAttribute(new AttributeExternalField("first_location_name", array("allowed_values"=>null, "extkey_attcode"=>"location_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("second_location_id", array("targetclass"=>"SecondLocation", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Location AS L WHERE L.org_id = :this->org_id'), "sql"=>"location_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array('org_id'))));
MetaModel::Init_AddAttribute(new AttributeExternalField("second_location_name", array("allowed_values"=>null, "extkey_attcode"=>"location_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array())));