<?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: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324428#M11429</link>
    <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2014 04:05:21 GMT</pubDate>
    <dc:creator>promanov_</dc:creator>
    <dc:date>2014-02-03T04:05:21Z</dc:date>
    <item>
      <title>Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324421#M11422</link>
      <description>&lt;P&gt;I have a standard Content View based on NXQL query.&lt;/P&gt;
&lt;P&gt;I want an optional criteria in the query, coming from a seam bean property. In this particular case, it is a flag to show or hide obsolete objects.&lt;/P&gt;
&lt;P&gt;Here is the query:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM Document WHERE ecm:currentLifeCycleState = 'approved' 
OR ( ecm:currentLifeCycleState = 'deleted' AND ? = 1 )
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;? parameter is mapped to a boolean property in a bean.&lt;/P&gt;
&lt;P&gt;This query works in 5.6, not in 5.8 (tested with HF03).&lt;/P&gt;
&lt;P&gt;Is it a bug or a behavior change?
Any other approaches to implement this?&lt;/P&gt;
&lt;P&gt;ERROR STACK:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Caused by: org.nuxeo.ecm.core.api.ClientException: Failed to execute query: null
	at org.nuxeo.ecm.core.api.AbstractSession.query(AbstractSession.java:1625)
	at org.nuxeo.ecm.core.api.AbstractSession.query(AbstractSession.java:1501)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:136)
	at com.sun.proxy.$Proxy89.query(Unknown Source)
	at org.nuxeo.ecm.automation.core.operations.document.Query.run(Query.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:135)
	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:149)
	... 84 more
Caused by: java.lang.NullPointerException
	at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker$WhereBuilder.getColumnInfo(NXQLQueryMaker.java:1447)
	at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker$WhereBuilder.visitExpression(NXQLQueryMaker.java:1624)
	at org.nuxeo.ecm.core.query.sql.model.Expression.accept(Expression.java:42)
	at org.nuxeo.ecm.core.query.sql.model.DefaultQueryVisitor.visitExpression(DefaultQueryVisitor.java:103)
	at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker$WhereBuilder.visitExpression(NXQLQueryMaker.java:1665)
	at org.nuxeo.ecm.core.query.sql.model.Expression.accept(Expression.java:42)
	at org.nuxeo.ecm.core.query.sql.model.DefaultQueryVisitor.visitExpression(DefaultQueryVisitor.java:103)
	at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker$WhereBuilder.visitExpression(NXQLQueryMaker.java:1665)
	at org.nuxeo.ecm.core.query.sql.model.Expression.accept(Expression.java:42)
	at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker$WhereBuilder.visitMultiExpression(NXQLQueryMaker.java:1584)
	at org.nuxeo.ecm.core.query.sql.model.MultiExpression.accept(MultiExpression.java:40)
	at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker.buildQuery(NXQLQueryMaker.java:455)
	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.query(JDBCMapper.java:750)
	at org.nuxeo.ecm.core.storage.sql.SoftRefCachingMapper.query(SoftRefCachingMapper.java:101)
	at org.nuxeo.ecm.core.storage.sql.SessionImpl.query(SessionImpl.java:1254)
	at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.query(ConnectionImpl.java:368)
	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession$SQLSessionQuery.execute(SQLSession.java:611)
	at org.nuxeo.ecm.core.api.AbstractSession.query(AbstractSession.java:1571)
	... 98 more
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Dec 2013 08:12:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324421#M11422</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2013-12-13T08:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324422#M11423</link>
      <description>&lt;P&gt;Has nobody else run into this issue?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 16:38:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324422#M11423</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2013-12-16T16:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324423#M11424</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 17:31:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324423#M11424</guid>
      <dc:creator>manuek_</dc:creator>
      <dc:date>2013-12-16T17:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324424#M11425</link>
      <description>&lt;P&gt;Thanks for your input.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 17:38:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324424#M11425</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2013-12-16T17:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324425#M11426</link>
      <description>&lt;P&gt;Well, it's very ugly and probably too cumbersome, but in your case (yes, it can work only with your NXQL request, but it's my only idea for the moment) is to replace your '?' by ecm&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 18:20:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324425#M11426</guid>
      <dc:creator>manuek_</dc:creator>
      <dc:date>2013-12-16T18:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324426#M11427</link>
      <description>&lt;P&gt;Thanks a lot for your responses manuek!&lt;/P&gt;
&lt;P&gt;The solutions/hints you've mentionned made me do more testing and I've noticed a curious combination that works.&lt;/P&gt;
&lt;P&gt;In the "A = B" clause:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the value-flag coming from seam bean put on the right position&lt;/LI&gt;
&lt;LI&gt;on the left position put the term ecm:isVersion that works in my case giving the constant "1"  as I don't use versionning on these particular doc types &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; (still pretty ugly, huh, and dangerous)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;So, a &lt;STRONG&gt;temporary hack-solution&lt;/STRONG&gt; looks like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM Document WHERE ecm:currentLifeCycleState = 'approved' 
OR ( ecm:currentLifeCycleState = 'deleted' AND ecm:isVersion = ? )
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This allows me to keep the structure of the query - having a criteria with it's activation flag along - waiting for the bug fix.&lt;/P&gt;
&lt;P&gt;Could nuxeo guys confirm that this is a bug and open an issue?
Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 19:32:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324426#M11427</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2013-12-16T19:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324427#M11428</link>
      <description>&lt;P&gt;This has been fixed for Nuxeo 5.8-HF06 and Nuxeo 5.9.2, cf &lt;A href="https://jira.nuxeo.com/browse/NXP-13658"&gt;NXP-13658&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2014 22:06:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324427#M11428</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2014-01-28T22:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo 5.6  to 5.8 - boolean values processing in NXQL bug or change?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324428#M11429</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2014 04:05:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-5-6-to-5-8-boolean-values-processing-in-nxql-bug-or-change/m-p/324428#M11429</guid>
      <dc:creator>promanov_</dc:creator>
      <dc:date>2014-02-03T04:05:21Z</dc:date>
    </item>
  </channel>
</rss>

