Any idea how to select all cmis:document with specified tags or category? I'm using Apache Chemistry. I'm guessing I should use JOINs but can't figure out how to do so, I'm still having trouble drawing relationships between types.
I found this piece of code:
testDoc = session.getObjectByPath("/test/testfolder1/test1.txt")
catIds = testDoc.getPropertyValue("cm:categories")
for (catId in catIds) {
cat = session.getObject(catId)
println(cat.name)
}
But so far I plan to use prepared statement, because i'm interested in the use of IN_FOLDER, just like this:
QueryStatement qs = session.createQueryStatement("SELECT ?, ? FROM ? WHERE ? > TIMESTAMP ? AND IN_FOLDER(?) OR ? IN (?)");
The goal of my request is to get all documents with certain category and contained in a folder (soon I'll have too add criteria on tag)
Thanks for your help
That's how I did for tags:
But it won't work if I decide to add the
IN_FOLDER
condition