Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying against properties in multiple aspects #37

Open
jpotts opened this issue Apr 30, 2020 · 1 comment
Open

Querying against properties in multiple aspects #37

jpotts opened this issue Apr 30, 2020 · 1 comment

Comments

@jpotts
Copy link
Owner

jpotts commented Apr 30, 2020

In the tutorial content there is some discussion about querying across properties that reside in multiple aspects. The text implies that it is not supported or that it is difficult to do and then shows an alternative that uses sub-selects. This is misleading as it is possible to do multiple joins to query across multiple aspects.

@douglascrp
Copy link

Yes, indeed, it works perfectly.

A sample query I used in my own custom project:

SELECT doc.*, cli.*, dono.*, tipo.*, iddoc.*, data.* 
FROM nexo:documentoEHS as doc  
JOIN nexo:idCliente as cli ON cli.cmis:objectId = doc.cmis:objectId  
JOIN nexo:donoDocumento as dono ON dono.cmis:objectId = doc.cmis:objectId  
JOIN nexo:tipoDocumento as tipo ON tipo.cmis:objectId = doc.cmis:objectId  
JOIN nexo:idDocumento as iddoc ON iddoc.cmis:objectId = doc.cmis:objectId  
JOIN nexo:dataDocumento as data ON data.cmis:objectId = doc.cmis:objectId  
WHERE cli.nexo:idCliente = 'clientenovo'  AND tipo.nexo:idTipoDocumento = 10

As you can see, lots of aspects, and the WHERE clause has conditions in two of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants