cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

Query on 2nd Level of Relationships

Query on 2nd Level of Relationships

Hi,

 

we want to query on the 2nd level of Relationsips.

 

I have the following Item Relationship constructs:

 

Item1 -> Item2 -> Item3

 

I want to build the following query:

Get all Item3 which,

     do not have a Relationship

     or

     do not have a Relationship to ID = 123456 (which is from Type Item1)

6 Comments
bcollins-2
6-Contributor

Is there a reason why item 3 can not be related to item 1 as well?

aharms
2-Guest

Yes it can have a direct relationship.

Both scenarios are viable that's why my query cannot give me all relevant Item3.

The direct relationship is not the problem there.

I just simplified the second rule. You can split the second rule into:

do not have a direct Relationship to ID = 123456 (which is from Type Item1)

or

do not have an indirect Relationship to ID = 123456 (which is from Type Item1) through any Item2

bcollins-2
6-Contributor

Ah, now I understand. And then would the ideal case for your scenario be that you would find all items which are not directly or indirectly related to ID 123456 by any degree of separation?

Rocko
15-Moonstone

maybe a dupe of Nested Queries?

aharms
2-Guest

I think you are right it may be the same use case

olivierlp
Community Manager
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.