LEFT JOIN QUERY RESULT GROUP BY OR DISTINCT

Hi!

Can someone help me ? I'm trying to make a LEFT JOIN QUERY, but the query return duplicate result. Its possible make a DISTINCT or GROUPBY ? Why the query return the JOIN values to ? The result dont need to show me only F.cmis:objectId as ID, F.cmis:name as name this columns ?

SELECT F.cmis:objectId as ID, F.cmis:name as name  FROM arizona:file:business F
LEFT JOIN arizona:relationship:copyrights RFC ON RFC.cmis:sourceId = F.cmis:objectId 
LEFT JOIN arizona:copyrights C ON C.cmis:objectId = RFC.cmis:targetId 
LEFT JOIN arizona:copyrights:permission P ON P.arizonaCopyrightsPermission:copyrightsId = C.cmis:objectId 

alt text

0 votes

1 answers

3330 views

ANSWER



The CMIS Query Language does not support DISTINCT or GROUP BY. See the spec § 2.1.14.2.1 BNF Grammar.

Nuxeo returns the object id and type for each joined document because this has proven to be very useful, and is used internally. Why is it a problem? The tool that is going to consume that data will only keep what it needs anyway.

0 votes



Florent, do you know how resolve that using some other strategy ? Do you know something about the other questions ?
05/13/2014

Answer edited.
05/13/2014

I cant create the max itens to the paginate :(, I need show 10 itens per page and show the count. I'm using skipTo and getPage to do that, How can I return 10 itens per page without duplicate itens on screen ?
05/13/2014

De-duplicate in your client.
05/15/2014