How to query your custom table

        <schema>fileTags</schema> 
        <idField>id</idField>
  <table>fileTags</table> 
 <dataSource>java:/nxsqldirectory</dataSource>
         <dataFile>directories/nature.csv</dataFile>
         <entryCacheName>fileTagsDirectory-cache</entryCacheName> 
 <createTablePolicy>always</createTablePolicy>
         <entryCacheWithoutReferencesName>fileTagsDirectory-cache-without-ref</entryCacheWithoutReferencesName>
     </directory>

I have created the above vocabulary. I am getting below log 2019-12-24T13:26:44,232 DEBUG [main] [org.nuxeo.ecm.directory.sql.SQLHelper] setting up table 'fileTags', policy='on_missing_columns' 2019-12-24T13:26:44,234 DEBUG [main] [org.nuxeo.ecm.directory.sql.SQLHelper] checking if table fileTags exists: true 2019-12-24T13:26:44,237 DEBUG [main] [org.nuxeo.ecm.directory.sql.SQLHelper] all fields matched for table 'fileTags'

I have tried getting select * from fileTags in nuxeo Dev Tools chrome extension or in nuxeo home NXSQL serach. But i am not getting anything. please let me know how to check the records.

0 votes

1 answers

1044 views

ANSWER



Hello,

using NXQL you only can search for documents. In nuxeo, documents include files, folders, users and groups. However, vocabularies are not considered as documents, so you cannot search for them using NXQL.

I recommend you to read the following documentation in order to understand how directories (vocabularies) work:

Anyway, what's the aim of retrieving the vocabulary entries? Depending on it, there are several ways of retrieving that information, like directly seeing them in the Web UI, using the REST API or even with SDK clients.

Regards.

0 votes