I've have made some change in the class Location this is what is needed for my query:
<field id="user-content-networkip" xsi:type="AttributeExternalKey" _delta="define">
<sql>networkip</sql>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
<target_class>IPv4Subnet</target_class>
</field>
in other class i need an oql query for the filter for the field:
<field id="user-content-iplan" xsi:type="AttributeExternalKey">
<sql>iplan</sql>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
<target_class>IPv4Address</target_class>
</field>
But i don't make a succesful query with oql.
When i try with the OQL request in iTop:
SELECT IPv4Address FROM IPv4Subnet AS IP JOIN Location AS LOC ON LOC.networkip = IP.subnet_id WHERE IP.id=3
iTop say it's an error:
Wrong format for Join clause (right hand), expecting an id, found 'subnet_id' in: SELECT IPv4Address FROM IPv4Subnet AS IP JOIN Location AS LOC ON LOC.networkip = IP.subnet_id WHERE IP.id=3, expecting {id}
So i need to select in the list ip address wich is in the subnet associated with the location.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've have made some change in the class Location this is what is needed for my query:
<field id="user-content-networkip" xsi:type="AttributeExternalKey" _delta="define">
<sql>networkip</sql>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
<target_class>IPv4Subnet</target_class>
</field>
in other class i need an oql query for the filter for the field:
<field id="user-content-iplan" xsi:type="AttributeExternalKey">
<sql>iplan</sql>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
<target_class>IPv4Address</target_class>
</field>
But i don't make a succesful query with oql.
When i try with the OQL request in iTop:
SELECT IPv4Address FROM IPv4Subnet AS IP JOIN Location AS LOC ON LOC.networkip = IP.subnet_id WHERE IP.id=3
iTop say it's an error:
Wrong format for Join clause (right hand), expecting an id, found 'subnet_id' in: SELECT IPv4Address FROM IPv4Subnet AS IP JOIN Location AS LOC ON LOC.networkip = IP.subnet_id WHERE IP.id=3, expecting {id}
So i need to select in the list ip address wich is in the subnet associated with the location.
Hello Guillaume,
You should post directly in the TeemIP forum, @xtophe38 and the TeemIP community might be more able to help you :)
Cheers,
Guillaume
I will copy the post in teemIP forum.
Thanks