Though the title may be incorrect, I need help with Spring Data.
I have two entities Policy and City refer to the same NodeEntity 'State' as shown below:
The following cypher query returns me all the policies that belong to the State 'FL'
My understanding is that the relationship name is obtained from the property name - 'riskState' in Policy entity.
If I apply the same logic for City, the following query did not return any data though I could see the relationships in the Data Browser.
Could you please explain the reason?
Thanks
I have two entities Policy and City refer to the same NodeEntity 'State' as shown below:
Code:
State riskState; //from Policy
@Indexed(indexName="cities", indexType=IndexType.SIMPLE, unique=true)
String city;
State state;
Code:
START n=node:states(code='FL')
match n<-[:riskState]-policy
RETURN policy.policyNumber;
If I apply the same logic for City, the following query did not return any data though I could see the relationships in the Data Browser.
Code:
START n=node:states(code='FL')
match n<-[:state]-city
RETURN city;
Thanks