02-06-2020, 05:01 PM
(This post was last modified: 02-06-2020, 05:02 PM by remkonoteboom.)
I think it's because TEL is using a slightly different mechanism:
search_key = 'testovy/asset?project=testovy&code=ASSET00002'
search_type, search_code = server.split_search_key(search_key)
search = Search(search_type)
search.add_filter("code", search_code)
search2 = Search("testovy/asset_in_asset")
search2.add_relationship_search_filter(search)
related_sobjects = search2.get_sobjects()
This is more efficient because it never needs to get the first sobject. It is all done in a single SQL call.
You can see that "search" can be arbitrarily complex and it will use a subselect into the second search.
Could you see if that works? It will help me pinpoint the bug in get_related_sobjects() (which should work).
search_key = 'testovy/asset?project=testovy&code=ASSET00002'
search_type, search_code = server.split_search_key(search_key)
search = Search(search_type)
search.add_filter("code", search_code)
search2 = Search("testovy/asset_in_asset")
search2.add_relationship_search_filter(search)
related_sobjects = search2.get_sobjects()
This is more efficient because it never needs to get the first sobject. It is all done in a single SQL call.
You can see that "search" can be arbitrarily complex and it will use a subselect into the second search.
Could you see if that works? It will help me pinpoint the bug in get_related_sobjects() (which should work).