02-06-2020, 07:57 PM
I have added this to schema an run this code:
from pyasm.search import Search
server.set_project('testovy')
search_key = 'testovy/asset?project=testovy&code=ASSET00002'
search_type, search_code = server.split_search_key(search_key)
search = Search(search_type)
sobject = search.get_by_search_key(search_key)
related_sobjects = sobject.get_related_sobjects('testovy/asset_in_asset', path='child')
And this is works fine.
Now i have duplicates in schema:
"
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="parent_asset_code" to_col="code" path="parent" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="child_asset_code" to_col="code" path="child" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="parent_asset_code" to_col="code" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="child_asset_code" to_col="code" type="many_to_many"/>
"
Is this ok?
from pyasm.search import Search
server.set_project('testovy')
search_key = 'testovy/asset?project=testovy&code=ASSET00002'
search_type, search_code = server.split_search_key(search_key)
search = Search(search_type)
sobject = search.get_by_search_key(search_key)
related_sobjects = sobject.get_related_sobjects('testovy/asset_in_asset', path='child')
And this is works fine.
Now i have duplicates in schema:
"
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="parent_asset_code" to_col="code" path="parent" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="child_asset_code" to_col="code" path="child" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="parent_asset_code" to_col="code" type="many_to_many"/>
<connect from="testovy/asset_in_asset" to="testovy/asset" relationship="code" from_col="child_asset_code" to_col="code" type="many_to_many"/>
"
Is this ok?