01-24-2012 08:00 PM
Hello I already saw the NXQL documentation and there are some questions that I have about it. I saw those two statements:
SELECT * FROM Document
SELECT * FROM Folder
Then I executed the next queries and I got the same result
SELECT * FROM File WHERE dc:title LIKE 'word1.pdf'
SELECT * FROM Document WHERE dc:title LIKE 'word1.pdf'
So, my question is What are the differences between Document and File? When should I use Document instead File and vice versa.
Also I saw this statement:
SELECT * FROM Note, File WHERE dc:title = 'My Doc'
What would be the equivalent meaning of that statement into normal sql? Will it be something like Select * from Note, File where Note.dc:title = 'My Doc' and File.dc:title = 'My Doc' ?
Thanks
01-25-2012 03:21 AM
You will find the documentation about nuxeo document types here: Document types which explains the type system and the questioned distinction quite well.
Shortly, every type in Nuxeo is a subtype of Document, so if the only type that you stored so far was of type File, the returned result set will be the same.
As for this statement:
SELECT * FROM Note, File WHERE dc:title = 'My Doc'
it just returns all documents of either Note or File type, where the field dc:title equals 'My Doc'. This field is available in both types and this comes from the fact that these types contain the same schema called 'dublincore' (which is prefixed as 'dc'). That schema contains the field title. To relate to a specific field in a schema you use this syntax:
schema:field
01-25-2012 03:21 AM
You will find the documentation about nuxeo document types here: Document types which explains the type system and the questioned distinction quite well.
Shortly, every type in Nuxeo is a subtype of Document, so if the only type that you stored so far was of type File, the returned result set will be the same.
As for this statement:
SELECT * FROM Note, File WHERE dc:title = 'My Doc'
it just returns all documents of either Note or File type, where the field dc:title equals 'My Doc'. This field is available in both types and this comes from the fact that these types contain the same schema called 'dublincore' (which is prefixed as 'dc'). That schema contains the field title. To relate to a specific field in a schema you use this syntax:
schema:field
01-25-2012 04:53 PM
Thanks a lot Sulejman, I also saw you other answer in the old forum. All the information that you have given me has been very useful.
03-14-2012 01:58 PM
If you have more question, create a new question. This is the idea of this forum. Please follow this recommendation for the community. And also, when you create an answer to a question, use it to answer and use comment to add a comment.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.