cancel
Showing results for 
Search instead for 
Did you mean: 

JOIN QUERY

albertochana
Champ in-the-making
Champ in-the-making
Hi, the problem is I have defined a type associated to other called "state". The association defined on model is:




<association name="pw:a_state">
  <title>R state</title>
  <source>
     <mandatory>false</mandatory>
     <many>true</many>
  </source>
  <target>
    <class>pw:state</class>
    <mandatory>false</mandatory>
    <many>true</many>
  </target>
</association>


How can I getting all types with its corresponding state by a join query or similar??

I have try the most easiest query select * from pw:my_type and it gets all properties in a QueryResult object, but the relationships object inside QueryResult is empty

Is it possible by a query? I cant execute a JOIN query on cmis:relationship because it is not queryable

Thanks
1 REPLY 1

albertochana
Champ in-the-making
Champ in-the-making
The question about the JOIN is not solved, but now i can get the relationships with this source:


OperationContext operationContext = new OperationContextImpl();
operationContext.setIncludeRelationships(IncludeRelationships.BOTH);

But i cant execute a JOIN QUERY because the id is a relationship and not a property, isnt it possible to do this by a query similar like this:


select * from pw:record R JOIN pw:state E ON R.child_association_to_state=S.cmisSmiley SurprisedbjectId

Any idea?

Thanks