Menu

OQL - Get PhysicalInterface NOT IN lnkConnectableCIToNetworkDevice

2015-03-18
2020-09-17
  • Christian V.

    Christian V. - 2015-03-18

    Hi,

    i would like to filter all PhysicalInterface from NetworkDevice which is not used by lnkConnectableCIToNetworkDevice.

    I changed in the class lnkConnectableCIToNetworkDevice the field network_port and device_port to AttributeExternalKey to get a dropDown menu, this works perfekt, but i only want to show in this list PhysicalInterface which are not in use.

    Even when i try to make an OQL Query on PhysicalInterface JOIN lnkConnectableCIToNetworkDevice i get an error: The joined class (lnkConnectableCIToNetworkDevice) is not compatible with the external key, which is pointing to NetworkDevice

    Here is my OQL:

    Simple for field:
    SELECT PhysicalInterface WHERE connectableci_id = :this->connectableci_id / :this->networkdevice_id

    Extended try:
    SELECT PhysicalInterface AS phy
    JOIN NetworkDevice AS nw ON phy.connectableci_id = nw.id
    JOIN lnkConnectableCIToNetworkDevice AS l1 ON l1.networkdevice_id = phy.id
    WHERE l1.networkdevice_id = :this->networkdevice_id AND phy.id NOT IN (l1.network_port)

    Maybe somebody can help me.

    Br Christian

     
  • Mykhailo Protas

    Mykhailo Protas - 2020-09-17

    Create the appropriate category and rule for the audit with the true key

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.