application_data_link::new (public)

 application_data_link::new -this_object_id this_object_id \
    -target_object_id target_object_id [ -relation_tag relation_tag ]

Defined in packages/acs-tcl/tcl/application-data-link-procs.tcl

Create a new data link between this_object_id and target_object_id.

Switches:
-this_object_id (required)
ID of the object that you want linked to the target object.
-target_object_id (required)
The ID of the target object.
-relation_tag (optional)
Relationship identifier

Testcases:
data_links_with_tag
Source code:
    if { [catch {
        application_data_link::new_from  -object_id $this_object_id  -to_object_id $target_object_id  -relation_tag $relation_tag

        application_data_link::new_to  -object_id $this_object_id  -from_object_id $target_object_id  -relation_tag $relation_tag

    }]}  {
        # check if error occurred because of existing link
        if { [application_data_link::exist_link -object_id $this_object_id -target_object_id $target_object_id -relation_tag $relation_tag] eq "1" } {
            ns_log Debug "application_data_link::new: link already exists"
        } else {
            ns_log Error "application_data_link::new: link creation failure"
        }
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/application-data-link-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: