<div dir="ltr">Hello Pavol,<div><br></div><div>Thanks for your clearance. At the extent of our tests, this has been happening in filtered bulk actions - objects are processed as many times as they appear on the query result.</div><div><br></div><div>Any other information that might help, let me know.</div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b>Rodrigo Yanis.</b><br><img src="http://www.identicum.com/img/favicon.ico">Identicum S.A.<br></font>Jorge Newbery 3226<br>Tel: +54 (11) 4824-9971<font face="arial, helvetica, sans-serif"><br><a href="mailto:ryanis@identicum.com" target="_blank"><font color="#0b5394">ryanis@identicum.com</font></a><br><a href="http://www.identicum.com/" target="_blank"><font color="#0b5394">www.identicum.com</font></a></font></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2017-03-29 18:47 GMT-03:00 Pavol Mederly <span dir="ltr"><<a href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hello Rodrigo,</p>
    <p>this is a known issue, and the one that is not easily resolvable.
      (It is recorded in JIRA, maybe in various contexts, like <a href="https://jira.evolveum.com/browse/MID-3293" target="_blank">MID-3293</a>).</p>
    <p>I'm afraid we will not be able to fix this in 3.6.</p>
    <p>A partial relief could be using the "exists" clause, i.e.</p>
    <p><tt><query></tt><tt><br>
      </tt><tt>    <filter></tt><tt><br>
      </tt><tt>        <exists></tt><tt><br>
      </tt><tt>            <path>assignment</path></tt><tt><br>
      </tt><tt>            <filter></tt><tt><br>
      </tt><tt>                <or></tt><tt><br>
      </tt><tt>                    <ref></tt><tt><br>
      </tt><tt>                       
        <path>targetRef</path></tt><tt><br>
      </tt><tt>                        <value
        oid="00000000-0000-0000-0000-<wbr>000000000004"/></tt><tt><br>
      </tt><tt>                    </ref></tt><tt><br>
      </tt><tt>                    <ref></tt><tt><br>
      </tt><tt>                       
        <path>targetRef</path></tt><tt><br>
      </tt><tt>                        <value
        oid="00000000-0000-0000-0000-<wbr>000000000008"/></tt><tt><br>
      </tt><tt>                    </ref></tt><tt><br>
      </tt><tt>                </or></tt><tt><br>
      </tt><tt>            </filter></tt><tt><br>
      </tt><tt>        </exists></tt><tt><br>
      </tt><tt>    </filter></tt><tt><br>
      </tt><tt></query></tt></p>
    <p>But it still returns two results if the user has both
      assignments.</p>
    <p>In midPoint, we do a manual "deduplication" of results at various
      places. Also, there's an experimental "distinct" option in our
      repository API, since 3.6. (But currently it is not available from
      the outside.)</p>
    <p>In what context do you have this problem? Is it in bulk actions?
      Or some other task?<br>
    </p>
    <pre class="m_5481941921510286176moz-signature" cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre><div><div class="h5">
    <div class="m_5481941921510286176moz-cite-prefix">On 29.03.2017 23:07, Rodrigo Yanis
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hello everyone,
        <div><br>
        </div>
        <div>We've been reproducing an issue with midpoint's
          querying/filtering of objects where, upon executing a query
          like the following, and expecting only one result for it, we
          get that result but multiple times.</div>
        <div><br>
        </div>
        <div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font size="1"><query><br>
                  <filter><br>
                      <or><br>
                          <ref><br>
                             
              <path>assignment/targetRef</<wbr>path><br>
                              <value
              oid="00000000-0000-1de4-0004-<wbr>000000000006"/><br>
                          </ref><br>
                          <ref><br>
                             
              <path>assignment/targetRef</<wbr>path><br>
                              <value
              oid="00000000-0000-1de4-0004-<wbr>000000000061"/><br>
                          </ref><br>
                      </or><br>
                  </filter><br>
              </query></font></blockquote>
          <div><br>
          </div>
          <div>So in this case only one object satisfies that condition,
            yet the output is the following:</div>
          <div><br>
          </div>
          <div><img src="cid:part2.34BB8EA3.9779C4C8@evolveum.com" alt="Imagen integrada 1" height="101" width="410"> </div>
        </div>
        <div><br>
        </div>
        <div>At first we thought this might have been a view issue, but
          then we tested it on a custom task's filter, and the result
          was that the same user was processed 3 times (or more in other
          examples), making this type of queries a no-go for
          performance-intensive processes. </div>
        <div><br>
        </div>
        <div>Is this the right way to approach a query like this? Or
          perhaps there's already a JIRA ticket for this...</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>
          <div>
            <div class="m_5481941921510286176gmail_signature">
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">
                            <div dir="ltr">
                              <div dir="ltr"><br>
                              </div>
                              <div dir="ltr"><font face="arial,
                                  helvetica, sans-serif"><b>Rodrigo
                                    Yanis.</b><br>
                                  <img src="http://www.identicum.com/img/favicon.ico">Identicum
                                  S.A.<br>
                                </font>Jorge Newbery 3226<br>
                                Tel: +54 (11) 4824-9971<font face="arial, helvetica, sans-serif"><br>
                                  <a href="mailto:ryanis@identicum.com" target="_blank"><font color="#0b5394">ryanis@identicum.com</font></a><br>
                                  <a href="http://www.identicum.com/" target="_blank"><font color="#0b5394">www.identicum.com</font></a></font></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_5481941921510286176mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_5481941921510286176moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_5481941921510286176moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>