<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to do a query NXQL with propierties in WHERE clause in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313875#M876</link>
    <description>&lt;P&gt;&lt;STRONG&gt;SELECT * FROM CustomType WHERE schema_prefix:custom_field LIKE '%text%'&lt;/STRONG&gt; should work, it works with my custom types. But you have to use the prefix of the schema, no the custom_type (dc is the prefix of the schema dublincore).&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 17:06:32 GMT</pubDate>
    <dc:creator>ioihanguren_</dc:creator>
    <dc:date>2016-11-24T17:06:32Z</dc:date>
    <item>
      <title>How to do a query NXQL with propierties in WHERE clause</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313874#M875</link>
      <description>&lt;P&gt;Hi, I have a custom type of data in nuxeo, this custom type has some fields inside, and I trying to do a query putting this propierties in the WHERE clause.&lt;/P&gt;
&lt;P&gt;For example I can do this in a query on I want to SELECT by title:
SELECT * FROM Document WHERE dc:title LIKE '%title%'
and it works.&lt;/P&gt;
&lt;P&gt;I have some simple custom field and I can do NXQL querys with : "SELECT * FROM Document WHERE custom_type:custom_field LIKE '%text%'" and this works too.&lt;/P&gt;
&lt;P&gt;But when I trying to do querys with custom type which has properties in, I don't knwo how I can do this.
Any help?
Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 15:32:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313874#M875</guid>
      <dc:creator>Domingo_Gonzále</dc:creator>
      <dc:date>2016-11-23T15:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a query NXQL with propierties in WHERE clause</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313875#M876</link>
      <description>&lt;P&gt;&lt;STRONG&gt;SELECT * FROM CustomType WHERE schema_prefix:custom_field LIKE '%text%'&lt;/STRONG&gt; should work, it works with my custom types. But you have to use the prefix of the schema, no the custom_type (dc is the prefix of the schema dublincore).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 17:06:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313875#M876</guid>
      <dc:creator>ioihanguren_</dc:creator>
      <dc:date>2016-11-24T17:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a query NXQL with propierties in WHERE clause</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313876#M877</link>
      <description>&lt;P&gt;You can add a custom property  in Custom  Properties Configuration named query and insert your query.
Example:SELECT * FROM doctype WHERE dc:title ILIKE '?%'  AND ecm:parentId='#{currentDocument.id}'.
You can use any el expression this way.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 09:42:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313876#M877</guid>
      <dc:creator>Bora_</dc:creator>
      <dc:date>2016-11-30T09:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a query NXQL with propierties in WHERE clause</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313877#M878</link>
      <description>&lt;P&gt;First of all what do you mean with custom types that has properties in, you mean query complex fields.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://doc.nuxeo.com/nxdoc/nxql/" target="test_blank"&gt;https://doc.nuxeo.com/nxdoc/nxql/&lt;/A&gt; This may help you a lot&lt;/P&gt;
&lt;P&gt;Complex Properties
You can refer to complex properties in NXQL, after the SELECT, in the WHERE clause, and in the ORDER BY clause (cf NXP-4464).&lt;/P&gt;
&lt;P&gt;A complex property is a property of a schema containing &amp;lt;xs:simpleType&amp;gt; lists, or &amp;lt;xs:complexType&amp;gt; subelements or sequences of them.&lt;/P&gt;
&lt;P&gt;For complex subproperties, like the length field of the content field of the file schema, you can refer to:&lt;/P&gt;
&lt;P&gt;content/length for the value of the subproperty.
For simple lists, like dc:subjects, you can refer to:&lt;/P&gt;
&lt;P&gt;dc:subjects/3 for the 4th element of the list (indexes start at 0),
dc:subjects/* for any element of the list,
dc:subjects/*1 for any element of the list, correlated with other uses of the same number after *.
For complex lists, like the elements of the files schema, you can refer to:&lt;/P&gt;
&lt;P&gt;files/3/file/length for the length of the 4th file (again, indexes start at 0),
files/*/file/length for any length
files/*1/file/length for any length, correlated with other uses of the same number after *.
It's important to note that if you use a * then the resulting SQL JOIN generated may return several resulting rows, which means that if you use the CoreSession.queryAndFetch API you may get several results for the same document.&lt;/P&gt;
&lt;P&gt;The difference between * and *1 gets important when you refer to the same expression twice, for instance if you want the documents with an optional attached of given characteristics, you must correlate the queries.&lt;/P&gt;
&lt;P&gt;This returns the documents with an attached text file of length 0:&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 09:54:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-do-a-query-nxql-with-propierties-in-where-clause/m-p/313877#M878</guid>
      <dc:creator>Amir_Buzo</dc:creator>
      <dc:date>2016-11-30T09:54:12Z</dc:date>
    </item>
  </channel>
</rss>

